]> git.sesse.net Git - casparcg/blob - dependencies/ffmpeg/doc/ffprobe.html
* Renamed ffmpeg 0.8 to ffmpeg
[casparcg] / dependencies / ffmpeg / doc / ffprobe.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
2 <html>
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>
8             and many others.
9 Maintained by: Many creative people.
10 Send bugs and suggestions to <texi2html-bug@nongnu.org>
11 -->
12 <head>
13 <title>ffprobe Documentation</title>
14
15 <meta name="description" content="ffprobe Documentation">
16 <meta name="keywords" content="ffprobe 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">
22 <!--
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}
36 -->
37 </style>
38
39
40 </head>
41
42 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
43
44 <a name="SEC_Top"></a>
45 <h1 class="settitle">ffprobe Documentation</h1>
46
47 <a name="SEC_Contents"></a>
48 <h1>Table of Contents</h1>
49 <div class="contents">
50
51 <ul class="toc">
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-3" href="#Options-3">3. Options</a>
55   <ul class="toc">
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   </ul></li>
60   <li><a name="toc-Decoders" href="#Decoders">4. Decoders</a></li>
61   <li><a name="toc-Video-Decoders" href="#Video-Decoders">5. Video Decoders</a>
62   <ul class="toc">
63     <li><a name="toc-rawvideo" href="#rawvideo">5.1 rawvideo</a>
64     <ul class="toc">
65       <li><a name="toc-Options-2" href="#Options-2">5.1.1 Options</a></li>
66     </ul>
67 </li>
68   </ul></li>
69   <li><a name="toc-Demuxers" href="#Demuxers">6. Demuxers</a>
70   <ul class="toc">
71     <li><a name="toc-image2" href="#image2">6.1 image2</a></li>
72     <li><a name="toc-applehttp" href="#applehttp">6.2 applehttp</a></li>
73   </ul></li>
74   <li><a name="toc-Protocols" href="#Protocols">7. Protocols</a>
75   <ul class="toc">
76     <li><a name="toc-applehttp-1" href="#applehttp-1">7.1 applehttp</a></li>
77     <li><a name="toc-concat" href="#concat">7.2 concat</a></li>
78     <li><a name="toc-file" href="#file">7.3 file</a></li>
79     <li><a name="toc-gopher" href="#gopher">7.4 gopher</a></li>
80     <li><a name="toc-http" href="#http">7.5 http</a></li>
81     <li><a name="toc-mmst" href="#mmst">7.6 mmst</a></li>
82     <li><a name="toc-mmsh" href="#mmsh">7.7 mmsh</a></li>
83     <li><a name="toc-md5" href="#md5">7.8 md5</a></li>
84     <li><a name="toc-pipe" href="#pipe">7.9 pipe</a></li>
85     <li><a name="toc-rtmp" href="#rtmp">7.10 rtmp</a></li>
86     <li><a name="toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">7.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
87     <li><a name="toc-rtp" href="#rtp">7.12 rtp</a></li>
88     <li><a name="toc-rtsp" href="#rtsp">7.13 rtsp</a></li>
89     <li><a name="toc-sap" href="#sap">7.14 sap</a>
90     <ul class="toc">
91       <li><a name="toc-Muxer" href="#Muxer">7.14.1 Muxer</a></li>
92       <li><a name="toc-Demuxer" href="#Demuxer">7.14.2 Demuxer</a></li>
93     </ul></li>
94     <li><a name="toc-tcp" href="#tcp">7.15 tcp</a></li>
95     <li><a name="toc-udp" href="#udp">7.16 udp</a></li>
96   </ul></li>
97   <li><a name="toc-Input-Devices" href="#Input-Devices">8. Input Devices</a>
98   <ul class="toc">
99     <li><a name="toc-alsa" href="#alsa">8.1 alsa</a></li>
100     <li><a name="toc-bktr" href="#bktr">8.2 bktr</a></li>
101     <li><a name="toc-dv1394" href="#dv1394">8.3 dv1394</a></li>
102     <li><a name="toc-fbdev" href="#fbdev">8.4 fbdev</a></li>
103     <li><a name="toc-jack" href="#jack">8.5 jack</a></li>
104     <li><a name="toc-lavfi" href="#lavfi">8.6 lavfi</a>
105     <ul class="toc">
106       <li><a name="toc-Options-1" href="#Options-1">8.6.1 Options</a></li>
107       <li><a name="toc-Examples" href="#Examples">8.6.2 Examples</a></li>
108     </ul></li>
109     <li><a name="toc-libdc1394" href="#libdc1394">8.7 libdc1394</a></li>
110     <li><a name="toc-openal" href="#openal">8.8 openal</a>
111     <ul class="toc">
112       <li><a name="toc-Options" href="#Options">8.8.1 Options</a></li>
113       <li><a name="toc-Examples-1" href="#Examples-1">8.8.2 Examples</a></li>
114     </ul></li>
115     <li><a name="toc-oss" href="#oss">8.9 oss</a></li>
116     <li><a name="toc-sndio" href="#sndio">8.10 sndio</a></li>
117     <li><a name="toc-video4linux-and-video4linux2" href="#video4linux-and-video4linux2">8.11 video4linux and video4linux2</a></li>
118     <li><a name="toc-vfwcap" href="#vfwcap">8.12 vfwcap</a></li>
119     <li><a name="toc-x11grab" href="#x11grab">8.13 x11grab</a>
120     <ul class="toc">
121       <li><a name="toc-follow_005fmouse-AVOption" href="#follow_005fmouse-AVOption">8.13.1 <var>follow_mouse</var> AVOption</a></li>
122       <li><a name="toc-show_005fregion-AVOption" href="#show_005fregion-AVOption">8.13.2 <var>show_region</var> AVOption</a></li>
123     </ul>
124 </li>
125   </ul>
126 </li>
127 </ul>
128 </div>
129
130 <hr size="1">
131 <a name="Synopsis"></a>
132 <h1 class="chapter"><a href="ffprobe.html#toc-Synopsis">1. Synopsis</a></h1>
133
134 <p>The generic syntax is:
135 </p>
136 <table><tr><td>&nbsp;</td><td><pre class="example">ffprobe [options] [&lsquo;<tt>input_file</tt>&rsquo;]
137 </pre></td></tr></table>
138
139 <a name="Description"></a>
140 <h1 class="chapter"><a href="ffprobe.html#toc-Description">2. Description</a></h1>
141
142 <p>ffprobe gathers information from multimedia streams and prints it in
143 human- and machine-readable fashion.
144 </p>
145 <p>For example it can be used to check the format of the container used
146 by a multimedia stream and the format and type of each media stream
147 contained in it.
148 </p>
149 <p>If a filename is specified in input, ffprobe will try to open and
150 probe the file content. If the file cannot be opened or recognized as
151 a multimedia file, a positive exit code is returned.
152 </p>
153 <p>ffprobe may be employed both as a standalone application or in
154 combination with a textual filter, which may perform more
155 sophisticated processing, e.g. statistical processing or plotting.
156 </p>
157 <p>Options are used to list some of the formats supported by ffprobe or
158 for specifying which information to display, and for setting how
159 ffprobe will show it.
160 </p>
161 <p>ffprobe output is designed to be easily parsable by a textual filter,
162 and consists of one or more sections of the form:
163 </p><table><tr><td>&nbsp;</td><td><pre class="example">[SECTION]
164 key1=val1
165 ...
166 keyN=valN
167 [/SECTION]
168 </pre></td></tr></table>
169
170 <p>Metadata tags stored in the container or in the streams are recognized
171 and printed in the corresponding &quot;FORMAT&quot; or &quot;STREAM&quot; section, and
172 are prefixed by the string &quot;TAG:&quot;.
173 </p>
174
175 <a name="Options-3"></a>
176 <h1 class="chapter"><a href="ffprobe.html#toc-Options-3">3. Options</a></h1>
177
178 <p>All the numerical options, if not specified otherwise, accept in input
179 a string representing a number, which may contain one of the
180 International System number postfixes, for example &rsquo;K&rsquo;, &rsquo;M&rsquo;, &rsquo;G&rsquo;.
181 If &rsquo;i&rsquo; is appended after the postfix, powers of 2 are used instead of
182 powers of 10. The &rsquo;B&rsquo; postfix multiplies the value for 8, and can be
183 appended after another postfix or used alone. This allows using for
184 example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as postfix.
185 </p>
186 <p>Options which do not take arguments are boolean options, and set the
187 corresponding value to true. They can be set to false by prefixing
188 with &quot;no&quot; the option name, for example using &quot;-nofoo&quot; in the
189 commandline will set to false the boolean option with name &quot;foo&quot;.
190 </p>
191 <a name="Generic-options"></a>
192 <h2 class="section"><a href="ffprobe.html#toc-Generic-options">3.1 Generic options</a></h2>
193
194 <p>These options are shared amongst the ff* tools.
195 </p>
196 <dl compact="compact">
197 <dt> &lsquo;<samp>-L</samp>&rsquo;</dt>
198 <dd><p>Show license.
199 </p>
200 </dd>
201 <dt> &lsquo;<samp>-h, -?, -help, --help</samp>&rsquo;</dt>
202 <dd><p>Show help.
203 </p>
204 </dd>
205 <dt> &lsquo;<samp>-version</samp>&rsquo;</dt>
206 <dd><p>Show version.
207 </p>
208 </dd>
209 <dt> &lsquo;<samp>-formats</samp>&rsquo;</dt>
210 <dd><p>Show available formats.
211 </p>
212 <p>The fields preceding the format names have the following meanings:
213 </p><dl compact="compact">
214 <dt> &lsquo;<samp>D</samp>&rsquo;</dt>
215 <dd><p>Decoding available
216 </p></dd>
217 <dt> &lsquo;<samp>E</samp>&rsquo;</dt>
218 <dd><p>Encoding available
219 </p></dd>
220 </dl>
221
222 </dd>
223 <dt> &lsquo;<samp>-codecs</samp>&rsquo;</dt>
224 <dd><p>Show available codecs.
225 </p>
226 <p>The fields preceding the codec names have the following meanings:
227 </p><dl compact="compact">
228 <dt> &lsquo;<samp>D</samp>&rsquo;</dt>
229 <dd><p>Decoding available
230 </p></dd>
231 <dt> &lsquo;<samp>E</samp>&rsquo;</dt>
232 <dd><p>Encoding available
233 </p></dd>
234 <dt> &lsquo;<samp>V/A/S</samp>&rsquo;</dt>
235 <dd><p>Video/audio/subtitle codec
236 </p></dd>
237 <dt> &lsquo;<samp>S</samp>&rsquo;</dt>
238 <dd><p>Codec supports slices
239 </p></dd>
240 <dt> &lsquo;<samp>D</samp>&rsquo;</dt>
241 <dd><p>Codec supports direct rendering
242 </p></dd>
243 <dt> &lsquo;<samp>T</samp>&rsquo;</dt>
244 <dd><p>Codec can handle input truncated at random locations instead of only at frame boundaries
245 </p></dd>
246 </dl>
247
248 </dd>
249 <dt> &lsquo;<samp>-bsfs</samp>&rsquo;</dt>
250 <dd><p>Show available bitstream filters.
251 </p>
252 </dd>
253 <dt> &lsquo;<samp>-protocols</samp>&rsquo;</dt>
254 <dd><p>Show available protocols.
255 </p>
256 </dd>
257 <dt> &lsquo;<samp>-filters</samp>&rsquo;</dt>
258 <dd><p>Show available libavfilter filters.
259 </p>
260 </dd>
261 <dt> &lsquo;<samp>-pix_fmts</samp>&rsquo;</dt>
262 <dd><p>Show available pixel formats.
263 </p>
264 </dd>
265 <dt> &lsquo;<samp>-loglevel <var>loglevel</var></samp>&rsquo;</dt>
266 <dd><p>Set the logging level used by the library.
267 <var>loglevel</var> is a number or a string containing one of the following values:
268 </p><dl compact="compact">
269 <dt> &lsquo;<samp>quiet</samp>&rsquo;</dt>
270 <dt> &lsquo;<samp>panic</samp>&rsquo;</dt>
271 <dt> &lsquo;<samp>fatal</samp>&rsquo;</dt>
272 <dt> &lsquo;<samp>error</samp>&rsquo;</dt>
273 <dt> &lsquo;<samp>warning</samp>&rsquo;</dt>
274 <dt> &lsquo;<samp>info</samp>&rsquo;</dt>
275 <dt> &lsquo;<samp>verbose</samp>&rsquo;</dt>
276 <dt> &lsquo;<samp>debug</samp>&rsquo;</dt>
277 </dl>
278
279 <p>By default the program logs to stderr, if coloring is supported by the
280 terminal, colors are used to mark errors and warnings. Log coloring
281 can be disabled setting the environment variable
282 <code>FFMPEG_FORCE_NOCOLOR</code> or <code>NO_COLOR</code>, or can be forced setting
283 the environment variable <code>FFMPEG_FORCE_COLOR</code>.
284 The use of the environment variable <code>NO_COLOR</code> is deprecated and
285 will be dropped in a following FFmpeg version.
286 </p>
287 </dd>
288 </dl>
289
290 <a name="AVOptions"></a>
291 <h2 class="section"><a href="ffprobe.html#toc-AVOptions">3.2 AVOptions</a></h2>
292
293 <p>These options are provided directly by the libavformat, libavdevice and
294 libavcodec libraries. To see the list of available AVOptions, use the
295 &lsquo;<samp>-help</samp>&rsquo; option. They are separated into two categories:
296 </p><dl compact="compact">
297 <dt> &lsquo;<samp>generic</samp>&rsquo;</dt>
298 <dd><p>These options can be set for any container, codec or device. Generic options are
299 listed under AVFormatContext options for containers/devices and under
300 AVCodecContext options for codecs.
301 </p></dd>
302 <dt> &lsquo;<samp>private</samp>&rsquo;</dt>
303 <dd><p>These options are specific to the given container, device or codec. Private
304 options are listed under their corresponding containers/devices/codecs.
305 </p></dd>
306 </dl>
307
308 <p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
309 an MP3 file, use the &lsquo;<samp>id3v2_version</samp>&rsquo; private option of the MP3
310 muxer:
311 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3
312 </pre></td></tr></table>
313
314 <p>You can precisely specify which stream(s) should the codec AVOption apply to by
315 appending a stream specifier of the form
316 &lsquo;<samp>[:<var>stream_type</var>][:<var>stream_index</var>]</samp>&rsquo; to the option name.
317 <var>stream_type</var> is &rsquo;v&rsquo; for video, &rsquo;a&rsquo; for audio and &rsquo;s&rsquo; for subtitle streams.
318 <var>stream_index</var> is a global stream index when <var>stream_type</var> isn&rsquo;t
319 given, otherwise it counts streams of the given type only. As always, the index
320 is zero-based. For example
321 </p><table><tr><td>&nbsp;</td><td><pre class="example">-foo -- applies to all applicable streams
322 -foo:v -- applies to all video streams
323 -foo:a:2 -- applies to the third audio stream
324 -foo:0 -- applies to the first stream
325 </pre></td></tr></table>
326
327 <p>Note -nooption syntax cannot be used for boolean AVOptions, use -option
328 0/-option 1.
329 </p>
330 <p>Note2 old undocumented way of specifying per-stream AVOptions by prepending
331 v/a/s to the options name is now obsolete and will be removed soon.
332 </p>
333 <a name="Main-options"></a>
334 <h2 class="section"><a href="ffprobe.html#toc-Main-options">3.3 Main options</a></h2>
335
336 <dl compact="compact">
337 <dt> &lsquo;<samp>-f <var>format</var></samp>&rsquo;</dt>
338 <dd><p>Force format to use.
339 </p>
340 </dd>
341 <dt> &lsquo;<samp>-unit</samp>&rsquo;</dt>
342 <dd><p>Show the unit of the displayed values.
343 </p>
344 </dd>
345 <dt> &lsquo;<samp>-prefix</samp>&rsquo;</dt>
346 <dd><p>Use SI prefixes for the displayed values.
347 Unless the &quot;-byte_binary_prefix&quot; option is used all the prefixes
348 are decimal.
349 </p>
350 </dd>
351 <dt> &lsquo;<samp>-byte_binary_prefix</samp>&rsquo;</dt>
352 <dd><p>Force the use of binary prefixes for byte values.
353 </p>
354 </dd>
355 <dt> &lsquo;<samp>-sexagesimal</samp>&rsquo;</dt>
356 <dd><p>Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
357 </p>
358 </dd>
359 <dt> &lsquo;<samp>-pretty</samp>&rsquo;</dt>
360 <dd><p>Prettify the format of the displayed values, it corresponds to the
361 options &quot;-unit -prefix -byte_binary_prefix -sexagesimal&quot;.
362 </p>
363 </dd>
364 <dt> &lsquo;<samp>-show_format</samp>&rsquo;</dt>
365 <dd><p>Show information about the container format of the input multimedia
366 stream.
367 </p>
368 <p>All the container format information is printed within a section with
369 name &quot;FORMAT&quot;.
370 </p>
371 </dd>
372 <dt> &lsquo;<samp>-show_packets</samp>&rsquo;</dt>
373 <dd><p>Show information about each packet contained in the input multimedia
374 stream.
375 </p>
376 <p>The information for each single packet is printed within a dedicated
377 section with name &quot;PACKET&quot;.
378 </p>
379 </dd>
380 <dt> &lsquo;<samp>-show_streams</samp>&rsquo;</dt>
381 <dd><p>Show information about each media stream contained in the input
382 multimedia stream.
383 </p>
384 <p>Each media stream information is printed within a dedicated section
385 with name &quot;STREAM&quot;.
386 </p>
387 </dd>
388 <dt> &lsquo;<samp>-i <var>input_file</var></samp>&rsquo;</dt>
389 <dd><p>Read <var>input_file</var>.
390 </p>
391 </dd>
392 </dl>
393
394 <a name="Decoders"></a>
395 <h1 class="chapter"><a href="ffprobe.html#toc-Decoders">4. Decoders</a></h1>
396
397 <p>Decoders are configured elements in FFmpeg which allow the decoding of
398 multimedia streams.
399 </p>
400 <p>When you configure your FFmpeg build, all the supported native decoders
401 are enabled by default. Decoders requiring an external library must be enabled
402 manually via the corresponding <code>--enable-lib</code> option. You can list all
403 available decoders using the configure option <code>--list-decoders</code>.
404 </p>
405 <p>You can disable all the decoders with the configure option
406 <code>--disable-decoders</code> and selectively enable / disable single decoders
407 with the options <code>--enable-decoder=<var>DECODER</var></code> /
408 <code>--disable-decoder=<var>DECODER</var></code>.
409 </p>
410 <p>The option <code>-codecs</code> of the ff* tools will display the list of
411 enabled decoders.
412 </p>
413
414 <a name="Video-Decoders"></a>
415 <h1 class="chapter"><a href="ffprobe.html#toc-Video-Decoders">5. Video Decoders</a></h1>
416
417 <p>A description of some of the currently available video decoders
418 follows.
419 </p>
420 <a name="rawvideo"></a>
421 <h2 class="section"><a href="ffprobe.html#toc-rawvideo">5.1 rawvideo</a></h2>
422
423 <p>Rawvideo decoder.
424 </p>
425 <p>This decoder decodes rawvideo streams.
426 </p>
427 <a name="Options-2"></a>
428 <h3 class="subsection"><a href="ffprobe.html#toc-Options-2">5.1.1 Options</a></h3>
429
430 <dl compact="compact">
431 <dt> &lsquo;<samp>top <var>top_field_first</var></samp>&rsquo;</dt>
432 <dd><p>Specify the assumed field type of the input video.
433 </p><dl compact="compact">
434 <dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
435 <dd><p>the video is assumed to be progressive (default)
436 </p></dd>
437 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
438 <dd><p>bottom-field-first is assumed
439 </p></dd>
440 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
441 <dd><p>top-field-first is assumed
442 </p></dd>
443 </dl>
444
445 </dd>
446 </dl>
447
448 <a name="Demuxers"></a>
449 <h1 class="chapter"><a href="ffprobe.html#toc-Demuxers">6. Demuxers</a></h1>
450
451 <p>Demuxers are configured elements in FFmpeg which allow to read the
452 multimedia streams from a particular type of file.
453 </p>
454 <p>When you configure your FFmpeg build, all the supported demuxers
455 are enabled by default. You can list all available ones using the
456 configure option &quot;&ndash;list-demuxers&quot;.
457 </p>
458 <p>You can disable all the demuxers using the configure option
459 &quot;&ndash;disable-demuxers&quot;, and selectively enable a single demuxer with
460 the option &quot;&ndash;enable-demuxer=<var>DEMUXER</var>&quot;, or disable it
461 with the option &quot;&ndash;disable-demuxer=<var>DEMUXER</var>&quot;.
462 </p>
463 <p>The option &quot;-formats&quot; of the ff* tools will display the list of
464 enabled demuxers.
465 </p>
466 <p>The description of some of the currently available demuxers follows.
467 </p>
468 <a name="image2"></a>
469 <h2 class="section"><a href="ffprobe.html#toc-image2">6.1 image2</a></h2>
470
471 <p>Image file demuxer.
472 </p>
473 <p>This demuxer reads from a list of image files specified by a pattern.
474 </p>
475 <p>The pattern may contain the string &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, which
476 specifies the position of the characters representing a sequential
477 number in each filename matched by the pattern. If the form
478 &quot;%d0<var>N</var>d&quot; is used, the string representing the number in each
479 filename is 0-padded and <var>N</var> is the total number of 0-padded
480 digits representing the number. The literal character &rsquo;%&rsquo; can be
481 specified in the pattern with the string &quot;%%&quot;.
482 </p>
483 <p>If the pattern contains &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, the first filename of
484 the file list specified by the pattern must contain a number
485 inclusively contained between 0 and 4, all the following numbers must
486 be sequential. This limitation may be hopefully fixed.
487 </p>
488 <p>The pattern may contain a suffix which is used to automatically
489 determine the format of the images contained in the files.
490 </p>
491 <p>For example the pattern &quot;img-%03d.bmp&quot; will match a sequence of
492 filenames of the form &lsquo;<tt>img-001.bmp</tt>&rsquo;, &lsquo;<tt>img-002.bmp</tt>&rsquo;, ...,
493 &lsquo;<tt>img-010.bmp</tt>&rsquo;, etc.; the pattern &quot;i%%m%%g-%d.jpg&quot; will match a
494 sequence of filenames of the form &lsquo;<tt>i%m%g-1.jpg</tt>&rsquo;,
495 &lsquo;<tt>i%m%g-2.jpg</tt>&rsquo;, ..., &lsquo;<tt>i%m%g-10.jpg</tt>&rsquo;, etc.
496 </p>
497 <p>The size, the pixel format, and the format of each image must be the
498 same for all the files in the sequence.
499 </p>
500 <p>The following example shows how to use &lsquo;<tt>ffmpeg</tt>&rsquo; for creating a
501 video from the images in the file sequence &lsquo;<tt>img-001.jpeg</tt>&rsquo;,
502 &lsquo;<tt>img-002.jpeg</tt>&rsquo;, ..., assuming an input framerate of 10 frames per
503 second:
504 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi
505 </pre></td></tr></table>
506
507 <p>Note that the pattern must not necessarily contain &quot;%d&quot; or
508 &quot;%0<var>N</var>d&quot;, for example to convert a single image file
509 &lsquo;<tt>img.jpeg</tt>&rsquo; you can employ the command:
510 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f image2 -i img.jpeg img.png
511 </pre></td></tr></table>
512
513 <a name="applehttp"></a>
514 <h2 class="section"><a href="ffprobe.html#toc-applehttp">6.2 applehttp</a></h2>
515
516 <p>Apple HTTP Live Streaming demuxer.
517 </p>
518 <p>This demuxer presents all AVStreams from all variant streams.
519 The id field is set to the bitrate variant index number. By setting
520 the discard flags on AVStreams (by pressing &rsquo;a&rsquo; or &rsquo;v&rsquo; in ffplay),
521 the caller can decide which variant streams to actually receive.
522 The total bitrate of the variant that the stream belongs to is
523 available in a metadata key named &quot;variant_bitrate&quot;.
524 </p>
525 <a name="Protocols"></a>
526 <h1 class="chapter"><a href="ffprobe.html#toc-Protocols">7. Protocols</a></h1>
527
528 <p>Protocols are configured elements in FFmpeg which allow to access
529 resources which require the use of a particular protocol.
530 </p>
531 <p>When you configure your FFmpeg build, all the supported protocols are
532 enabled by default. You can list all available ones using the
533 configure option &quot;&ndash;list-protocols&quot;.
534 </p>
535 <p>You can disable all the protocols using the configure option
536 &quot;&ndash;disable-protocols&quot;, and selectively enable a protocol using the
537 option &quot;&ndash;enable-protocol=<var>PROTOCOL</var>&quot;, or you can disable a
538 particular protocol using the option
539 &quot;&ndash;disable-protocol=<var>PROTOCOL</var>&quot;.
540 </p>
541 <p>The option &quot;-protocols&quot; of the ff* tools will display the list of
542 supported protocols.
543 </p>
544 <p>A description of the currently available protocols follows.
545 </p>
546 <a name="applehttp-1"></a>
547 <h2 class="section"><a href="ffprobe.html#toc-applehttp-1">7.1 applehttp</a></h2>
548
549 <p>Read Apple HTTP Live Streaming compliant segmented stream as
550 a uniform one. The M3U8 playlists describing the segments can be
551 remote HTTP resources or local files, accessed using the standard
552 file protocol.
553 HTTP is default, specific protocol can be declared by specifying
554 &quot;+<var>proto</var>&quot; after the applehttp URI scheme name, where <var>proto</var>
555 is either &quot;file&quot; or &quot;http&quot;.
556 </p>
557 <table><tr><td>&nbsp;</td><td><pre class="example">applehttp://host/path/to/remote/resource.m3u8
558 applehttp+http://host/path/to/remote/resource.m3u8
559 applehttp+file://path/to/local/resource.m3u8
560 </pre></td></tr></table>
561
562 <a name="concat"></a>
563 <h2 class="section"><a href="ffprobe.html#toc-concat">7.2 concat</a></h2>
564
565 <p>Physical concatenation protocol.
566 </p>
567 <p>Allow to read and seek from many resource in sequence as if they were
568 a unique resource.
569 </p>
570 <p>A URL accepted by this protocol has the syntax:
571 </p><table><tr><td>&nbsp;</td><td><pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
572 </pre></td></tr></table>
573
574 <p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
575 resource to be concatenated, each one possibly specifying a distinct
576 protocol.
577 </p>
578 <p>For example to read a sequence of files &lsquo;<tt>split1.mpeg</tt>&rsquo;,
579 &lsquo;<tt>split2.mpeg</tt>&rsquo;, &lsquo;<tt>split3.mpeg</tt>&rsquo; with &lsquo;<tt>ffplay</tt>&rsquo; use the
580 command:
581 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
582 </pre></td></tr></table>
583
584 <p>Note that you may need to escape the character &quot;|&quot; which is special for
585 many shells.
586 </p>
587 <a name="file"></a>
588 <h2 class="section"><a href="ffprobe.html#toc-file">7.3 file</a></h2>
589
590 <p>File access protocol.
591 </p>
592 <p>Allow to read from or read to a file.
593 </p>
594 <p>For example to read from a file &lsquo;<tt>input.mpeg</tt>&rsquo; with &lsquo;<tt>ffmpeg</tt>&rsquo;
595 use the command:
596 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i file:input.mpeg output.mpeg
597 </pre></td></tr></table>
598
599 <p>The ff* tools default to the file protocol, that is a resource
600 specified with the name &quot;FILE.mpeg&quot; is interpreted as the URL
601 &quot;file:FILE.mpeg&quot;.
602 </p>
603 <a name="gopher"></a>
604 <h2 class="section"><a href="ffprobe.html#toc-gopher">7.4 gopher</a></h2>
605
606 <p>Gopher protocol.
607 </p>
608 <a name="http"></a>
609 <h2 class="section"><a href="ffprobe.html#toc-http">7.5 http</a></h2>
610
611 <p>HTTP (Hyper Text Transfer Protocol).
612 </p>
613 <a name="mmst"></a>
614 <h2 class="section"><a href="ffprobe.html#toc-mmst">7.6 mmst</a></h2>
615
616 <p>MMS (Microsoft Media Server) protocol over TCP.
617 </p>
618 <a name="mmsh"></a>
619 <h2 class="section"><a href="ffprobe.html#toc-mmsh">7.7 mmsh</a></h2>
620
621 <p>MMS (Microsoft Media Server) protocol over HTTP.
622 </p>
623 <p>The required syntax is:
624 </p><table><tr><td>&nbsp;</td><td><pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
625 </pre></td></tr></table>
626
627 <a name="md5"></a>
628 <h2 class="section"><a href="ffprobe.html#toc-md5">7.8 md5</a></h2>
629
630 <p>MD5 output protocol.
631 </p>
632 <p>Computes the MD5 hash of the data to be written, and on close writes
633 this to the designated output or stdout if none is specified. It can
634 be used to test muxers without writing an actual file.
635 </p>
636 <p>Some examples follow.
637 </p><table><tr><td>&nbsp;</td><td><pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
638 ffmpeg -i input.flv -f avi -y md5:output.avi.md5
639
640 # Write the MD5 hash of the encoded AVI file to stdout.
641 ffmpeg -i input.flv -f avi -y md5:
642 </pre></td></tr></table>
643
644 <p>Note that some formats (typically MOV) require the output protocol to
645 be seekable, so they will fail with the MD5 output protocol.
646 </p>
647 <a name="pipe"></a>
648 <h2 class="section"><a href="ffprobe.html#toc-pipe">7.9 pipe</a></h2>
649
650 <p>UNIX pipe access protocol.
651 </p>
652 <p>Allow to read and write from UNIX pipes.
653 </p>
654 <p>The accepted syntax is:
655 </p><table><tr><td>&nbsp;</td><td><pre class="example">pipe:[<var>number</var>]
656 </pre></td></tr></table>
657
658 <p><var>number</var> is the number corresponding to the file descriptor of the
659 pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).  If <var>number</var>
660 is not specified, by default the stdout file descriptor will be used
661 for writing, stdin for reading.
662 </p>
663 <p>For example to read from stdin with &lsquo;<tt>ffmpeg</tt>&rsquo;:
664 </p><table><tr><td>&nbsp;</td><td><pre class="example">cat test.wav | ffmpeg -i pipe:0
665 # ...this is the same as...
666 cat test.wav | ffmpeg -i pipe:
667 </pre></td></tr></table>
668
669 <p>For writing to stdout with &lsquo;<tt>ffmpeg</tt>&rsquo;:
670 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat &gt; test.avi
671 # ...this is the same as...
672 ffmpeg -i test.wav -f avi pipe: | cat &gt; test.avi
673 </pre></td></tr></table>
674
675 <p>Note that some formats (typically MOV), require the output protocol to
676 be seekable, so they will fail with the pipe output protocol.
677 </p>
678 <a name="rtmp"></a>
679 <h2 class="section"><a href="ffprobe.html#toc-rtmp">7.10 rtmp</a></h2>
680
681 <p>Real-Time Messaging Protocol.
682 </p>
683 <p>The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐
684 dia content across a TCP/IP network.
685 </p>
686 <p>The required syntax is:
687 </p><table><tr><td>&nbsp;</td><td><pre class="example">rtmp://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
688 </pre></td></tr></table>
689
690 <p>The accepted parameters are:
691 </p><dl compact="compact">
692 <dt> &lsquo;<samp>server</samp>&rsquo;</dt>
693 <dd><p>The address of the RTMP server.
694 </p>
695 </dd>
696 <dt> &lsquo;<samp>port</samp>&rsquo;</dt>
697 <dd><p>The number of the TCP port to use (by default is 1935).
698 </p>
699 </dd>
700 <dt> &lsquo;<samp>app</samp>&rsquo;</dt>
701 <dd><p>It is the name of the application to access. It usually corresponds to
702 the path where the application is installed on the RTMP server
703 (e.g. &lsquo;<tt>/ondemand/</tt>&rsquo;, &lsquo;<tt>/flash/live/</tt>&rsquo;, etc.).
704 </p>
705 </dd>
706 <dt> &lsquo;<samp>playpath</samp>&rsquo;</dt>
707 <dd><p>It is the path or name of the resource to play with reference to the
708 application specified in <var>app</var>, may be prefixed by &quot;mp4:&quot;.
709 </p>
710 </dd>
711 </dl>
712
713 <p>For example to read with &lsquo;<tt>ffplay</tt>&rsquo; a multimedia resource named
714 &quot;sample&quot; from the application &quot;vod&quot; from an RTMP server &quot;myserver&quot;:
715 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay rtmp://myserver/vod/sample
716 </pre></td></tr></table>
717
718 <a name="rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
719 <h2 class="section"><a href="ffprobe.html#toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">7.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></h2>
720
721 <p>Real-Time Messaging Protocol and its variants supported through
722 librtmp.
723 </p>
724 <p>Requires the presence of the librtmp headers and library during
725 configuration. You need to explicitely configure the build with
726 &quot;&ndash;enable-librtmp&quot;. If enabled this will replace the native RTMP
727 protocol.
728 </p>
729 <p>This protocol provides most client functions and a few server
730 functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
731 encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
732 variants of these encrypted types (RTMPTE, RTMPTS).
733 </p>
734 <p>The required syntax is:
735 </p><table><tr><td>&nbsp;</td><td><pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
736 </pre></td></tr></table>
737
738 <p>where <var>rtmp_proto</var> is one of the strings &quot;rtmp&quot;, &quot;rtmpt&quot;, &quot;rtmpe&quot;,
739 &quot;rtmps&quot;, &quot;rtmpte&quot;, &quot;rtmpts&quot; corresponding to each RTMP variant, and
740 <var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
741 meaning as specified for the RTMP native protocol.
742 <var>options</var> contains a list of space-separated options of the form
743 <var>key</var>=<var>val</var>.
744 </p>
745 <p>See the librtmp manual page (man 3 librtmp) for more information.
746 </p>
747 <p>For example, to stream a file in real-time to an RTMP server using
748 &lsquo;<tt>ffmpeg</tt>&rsquo;:
749 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
750 </pre></td></tr></table>
751
752 <p>To play the same stream using &lsquo;<tt>ffplay</tt>&rsquo;:
753 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffplay &quot;rtmp://myserver/live/mystream live=1&quot;
754 </pre></td></tr></table>
755
756 <a name="rtp"></a>
757 <h2 class="section"><a href="ffprobe.html#toc-rtp">7.12 rtp</a></h2>
758
759 <p>Real-Time Protocol.
760 </p>
761 <a name="rtsp"></a>
762 <h2 class="section"><a href="ffprobe.html#toc-rtsp">7.13 rtsp</a></h2>
763
764 <p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
765 and muxer. The demuxer supports both normal RTSP (with data transferred
766 over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
767 data transferred over RDT).
768 </p>
769 <p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
770 supporting it (currently Darwin Streaming Server and Mischa Spiegelmock&rsquo;s
771 <a href="http://github.com/revmischa/rtsp-server">RTSP server</a>).
772 </p>
773 <p>The required syntax for a RTSP url is:
774 </p><table><tr><td>&nbsp;</td><td><pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>[?<var>options</var>]
775 </pre></td></tr></table>
776
777 <p><var>options</var> is a <code>&amp;</code>-separated list. The following options
778 are supported:
779 </p>
780 <dl compact="compact">
781 <dt> &lsquo;<samp>udp</samp>&rsquo;</dt>
782 <dd><p>Use UDP as lower transport protocol.
783 </p>
784 </dd>
785 <dt> &lsquo;<samp>tcp</samp>&rsquo;</dt>
786 <dd><p>Use TCP (interleaving within the RTSP control channel) as lower
787 transport protocol.
788 </p>
789 </dd>
790 <dt> &lsquo;<samp>multicast</samp>&rsquo;</dt>
791 <dd><p>Use UDP multicast as lower transport protocol.
792 </p>
793 </dd>
794 <dt> &lsquo;<samp>http</samp>&rsquo;</dt>
795 <dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
796 passing proxies.
797 </p>
798 </dd>
799 <dt> &lsquo;<samp>filter_src</samp>&rsquo;</dt>
800 <dd><p>Accept packets only from negotiated peer address and port.
801 </p></dd>
802 </dl>
803
804 <p>Multiple lower transport protocols may be specified, in that case they are
805 tried one at a time (if the setup of one fails, the next one is tried).
806 For the muxer, only the <code>tcp</code> and <code>udp</code> options are supported.
807 </p>
808 <p>When receiving data over UDP, the demuxer tries to reorder received packets
809 (since they may arrive out of order, or packets may get lost totally). In
810 order for this to be enabled, a maximum delay must be specified in the
811 <code>max_delay</code> field of AVFormatContext.
812 </p>
813 <p>When watching multi-bitrate Real-RTSP streams with &lsquo;<tt>ffplay</tt>&rsquo;, the
814 streams to display can be chosen with <code>-vst</code> <var>n</var> and
815 <code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
816 on the fly by pressing <code>v</code> and <code>a</code>.
817 </p>
818 <p>Example command lines:
819 </p>
820 <p>To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
821 </p>
822 <table><tr><td>&nbsp;</td><td><pre class="example">ffplay -max_delay 500000 rtsp://server/video.mp4?udp
823 </pre></td></tr></table>
824
825 <p>To watch a stream tunneled over HTTP:
826 </p>
827 <table><tr><td>&nbsp;</td><td><pre class="example">ffplay rtsp://server/video.mp4?http
828 </pre></td></tr></table>
829
830 <p>To send a stream in realtime to a RTSP server, for others to watch:
831 </p>
832 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
833 </pre></td></tr></table>
834
835 <a name="sap"></a>
836 <h2 class="section"><a href="ffprobe.html#toc-sap">7.14 sap</a></h2>
837
838 <p>Session Announcement Protocol (RFC 2974). This is not technically a
839 protocol handler in libavformat, it is a muxer and demuxer.
840 It is used for signalling of RTP streams, by announcing the SDP for the
841 streams regularly on a separate port.
842 </p>
843 <a name="Muxer"></a>
844 <h3 class="subsection"><a href="ffprobe.html#toc-Muxer">7.14.1 Muxer</a></h3>
845
846 <p>The syntax for a SAP url given to the muxer is:
847 </p><table><tr><td>&nbsp;</td><td><pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
848 </pre></td></tr></table>
849
850 <p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
851 or to port 5004 if no port is specified.
852 <var>options</var> is a <code>&amp;</code>-separated list. The following options
853 are supported:
854 </p>
855 <dl compact="compact">
856 <dt> &lsquo;<samp>announce_addr=<var>address</var></samp>&rsquo;</dt>
857 <dd><p>Specify the destination IP address for sending the announcements to.
858 If omitted, the announcements are sent to the commonly used SAP
859 announcement multicast address 224.2.127.254 (sap.mcast.net), or
860 ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
861 </p>
862 </dd>
863 <dt> &lsquo;<samp>announce_port=<var>port</var></samp>&rsquo;</dt>
864 <dd><p>Specify the port to send the announcements on, defaults to
865 9875 if not specified.
866 </p>
867 </dd>
868 <dt> &lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
869 <dd><p>Specify the time to live value for the announcements and RTP packets,
870 defaults to 255.
871 </p>
872 </dd>
873 <dt> &lsquo;<samp>same_port=<var>0|1</var></samp>&rsquo;</dt>
874 <dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
875 default), all streams are sent on unique ports, with each stream on a
876 port 2 numbers higher than the previous.
877 VLC/Live555 requires this to be set to 1, to be able to receive the stream.
878 The RTP stack in libavformat for receiving requires all streams to be sent
879 on unique ports.
880 </p></dd>
881 </dl>
882
883 <p>Example command lines follow.
884 </p>
885 <p>To broadcast a stream on the local subnet, for watching in VLC:
886 </p>
887 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
888 </pre></td></tr></table>
889
890 <p>Similarly, for watching in ffplay:
891 </p>
892 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
893 </pre></td></tr></table>
894
895 <p>And for watching in ffplay, over IPv6:
896 </p>
897 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
898 </pre></td></tr></table>
899
900 <a name="Demuxer"></a>
901 <h3 class="subsection"><a href="ffprobe.html#toc-Demuxer">7.14.2 Demuxer</a></h3>
902
903 <p>The syntax for a SAP url given to the demuxer is:
904 </p><table><tr><td>&nbsp;</td><td><pre class="example">sap://[<var>address</var>][:<var>port</var>]
905 </pre></td></tr></table>
906
907 <p><var>address</var> is the multicast address to listen for announcements on,
908 if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
909 is the port that is listened on, 9875 if omitted.
910 </p>
911 <p>The demuxers listens for announcements on the given address and port.
912 Once an announcement is received, it tries to receive that particular stream.
913 </p>
914 <p>Example command lines follow.
915 </p>
916 <p>To play back the first stream announced on the normal SAP multicast address:
917 </p>
918 <table><tr><td>&nbsp;</td><td><pre class="example">ffplay sap://
919 </pre></td></tr></table>
920
921 <p>To play back the first stream announced on one the default IPv6 SAP multicast address:
922 </p>
923 <table><tr><td>&nbsp;</td><td><pre class="example">ffplay sap://[ff0e::2:7ffe]
924 </pre></td></tr></table>
925
926 <a name="tcp"></a>
927 <h2 class="section"><a href="ffprobe.html#toc-tcp">7.15 tcp</a></h2>
928
929 <p>Trasmission Control Protocol.
930 </p>
931 <p>The required syntax for a TCP url is:
932 </p><table><tr><td>&nbsp;</td><td><pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
933 </pre></td></tr></table>
934
935 <dl compact="compact">
936 <dt> &lsquo;<samp>listen</samp>&rsquo;</dt>
937 <dd><p>Listen for an incoming connection
938 </p>
939 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
940 ffplay tcp://<var>hostname</var>:<var>port</var>
941 </pre></td></tr></table>
942
943 </dd>
944 </dl>
945
946 <a name="udp"></a>
947 <h2 class="section"><a href="ffprobe.html#toc-udp">7.16 udp</a></h2>
948
949 <p>User Datagram Protocol.
950 </p>
951 <p>The required syntax for a UDP url is:
952 </p><table><tr><td>&nbsp;</td><td><pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
953 </pre></td></tr></table>
954
955 <p><var>options</var> contains a list of &amp;-seperated options of the form <var>key</var>=<var>val</var>.
956 Follow the list of supported options.
957 </p>
958 <dl compact="compact">
959 <dt> &lsquo;<samp>buffer_size=<var>size</var></samp>&rsquo;</dt>
960 <dd><p>set the UDP buffer size in bytes
961 </p>
962 </dd>
963 <dt> &lsquo;<samp>localport=<var>port</var></samp>&rsquo;</dt>
964 <dd><p>override the local UDP port to bind with
965 </p>
966 </dd>
967 <dt> &lsquo;<samp>pkt_size=<var>size</var></samp>&rsquo;</dt>
968 <dd><p>set the size in bytes of UDP packets
969 </p>
970 </dd>
971 <dt> &lsquo;<samp>reuse=<var>1|0</var></samp>&rsquo;</dt>
972 <dd><p>explicitly allow or disallow reusing UDP sockets
973 </p>
974 </dd>
975 <dt> &lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
976 <dd><p>set the time to live value (for multicast only)
977 </p>
978 </dd>
979 <dt> &lsquo;<samp>connect=<var>1|0</var></samp>&rsquo;</dt>
980 <dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
981 destination address can&rsquo;t be changed with ff_udp_set_remote_url later.
982 If the destination address isn&rsquo;t known at the start, this option can
983 be specified in ff_udp_set_remote_url, too.
984 This allows finding out the source address for the packets with getsockname,
985 and makes writes return with AVERROR(ECONNREFUSED) if &quot;destination
986 unreachable&quot; is received.
987 For receiving, this gives the benefit of only receiving packets from
988 the specified peer address/port.
989 </p></dd>
990 </dl>
991
992 <p>Some usage examples of the udp protocol with &lsquo;<tt>ffmpeg</tt>&rsquo; follow.
993 </p>
994 <p>To stream over UDP to a remote endpoint:
995 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
996 </pre></td></tr></table>
997
998 <p>To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
999 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&amp;buffer_size=65535
1000 </pre></td></tr></table>
1001
1002 <p>To receive over UDP from a remote endpoint:
1003 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var>
1004 </pre></td></tr></table>
1005
1006 <a name="Input-Devices"></a>
1007 <h1 class="chapter"><a href="ffprobe.html#toc-Input-Devices">8. Input Devices</a></h1>
1008
1009 <p>Input devices are configured elements in FFmpeg which allow to access
1010 the data coming from a multimedia device attached to your system.
1011 </p>
1012 <p>When you configure your FFmpeg build, all the supported input devices
1013 are enabled by default. You can list all available ones using the
1014 configure option &quot;&ndash;list-indevs&quot;.
1015 </p>
1016 <p>You can disable all the input devices using the configure option
1017 &quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the
1018 option &quot;&ndash;enable-indev=<var>INDEV</var>&quot;, or you can disable a particular
1019 input device using the option &quot;&ndash;disable-indev=<var>INDEV</var>&quot;.
1020 </p>
1021 <p>The option &quot;-formats&quot; of the ff* tools will display the list of
1022 supported input devices (amongst the demuxers).
1023 </p>
1024 <p>A description of the currently available input devices follows.
1025 </p>
1026 <a name="alsa"></a>
1027 <h2 class="section"><a href="ffprobe.html#toc-alsa">8.1 alsa</a></h2>
1028
1029 <p>ALSA (Advanced Linux Sound Architecture) input device.
1030 </p>
1031 <p>To enable this input device during configuration you need libasound
1032 installed on your system.
1033 </p>
1034 <p>This device allows capturing from an ALSA device. The name of the
1035 device to capture has to be an ALSA card identifier.
1036 </p>
1037 <p>An ALSA identifier has the syntax:
1038 </p><table><tr><td>&nbsp;</td><td><pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
1039 </pre></td></tr></table>
1040
1041 <p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
1042 </p>
1043 <p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
1044 specify card number or identifier, device number and subdevice number
1045 (-1 means any).
1046 </p>
1047 <p>To see the list of cards currently recognized by your system check the
1048 files &lsquo;<tt>/proc/asound/cards</tt>&rsquo; and &lsquo;<tt>/proc/asound/devices</tt>&rsquo;.
1049 </p>
1050 <p>For example to capture with &lsquo;<tt>ffmpeg</tt>&rsquo; from an ALSA device with
1051 card id 0, you may run the command:
1052 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
1053 </pre></td></tr></table>
1054
1055 <p>For more information see:
1056 <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>
1057 </p>
1058 <a name="bktr"></a>
1059 <h2 class="section"><a href="ffprobe.html#toc-bktr">8.2 bktr</a></h2>
1060
1061 <p>BSD video input device.
1062 </p>
1063 <a name="dv1394"></a>
1064 <h2 class="section"><a href="ffprobe.html#toc-dv1394">8.3 dv1394</a></h2>
1065
1066 <p>Linux DV 1394 input device.
1067 </p>
1068 <a name="fbdev"></a>
1069 <h2 class="section"><a href="ffprobe.html#toc-fbdev">8.4 fbdev</a></h2>
1070
1071 <p>Linux framebuffer input device.
1072 </p>
1073 <p>The Linux framebuffer is a graphic hardware-independent abstraction
1074 layer to show graphics on a computer monitor, typically on the
1075 console. It is accessed through a file device node, usually
1076 &lsquo;<tt>/dev/fb0</tt>&rsquo;.
1077 </p>
1078 <p>For more detailed information read the file
1079 Documentation/fb/framebuffer.txt included in the Linux source tree.
1080 </p>
1081 <p>To record from the framebuffer device &lsquo;<tt>/dev/fb0</tt>&rsquo; with
1082 &lsquo;<tt>ffmpeg</tt>&rsquo;:
1083 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
1084 </pre></td></tr></table>
1085
1086 <p>You can take a single screenshot image with the command:
1087 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg
1088 </pre></td></tr></table>
1089
1090 <p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
1091 </p>
1092 <a name="jack"></a>
1093 <h2 class="section"><a href="ffprobe.html#toc-jack">8.5 jack</a></h2>
1094
1095 <p>JACK input device.
1096 </p>
1097 <p>To enable this input device during configuration you need libjack
1098 installed on your system.
1099 </p>
1100 <p>A JACK input device creates one or more JACK writable clients, one for
1101 each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
1102 <var>client_name</var> is the name provided by the application, and <var>N</var>
1103 is a number which identifies the channel.
1104 Each writable client will send the acquired data to the FFmpeg input
1105 device.
1106 </p>
1107 <p>Once you have created one or more JACK readable clients, you need to
1108 connect them to one or more JACK writable clients.
1109 </p>
1110 <p>To connect or disconnect JACK clients you can use the
1111 &lsquo;<tt>jack_connect</tt>&rsquo; and &lsquo;<tt>jack_disconnect</tt>&rsquo; programs, or do it
1112 through a graphical interface, for example with &lsquo;<tt>qjackctl</tt>&rsquo;.
1113 </p>
1114 <p>To list the JACK clients and their properties you can invoke the command
1115 &lsquo;<tt>jack_lsp</tt>&rsquo;.
1116 </p>
1117 <p>Follows an example which shows how to capture a JACK readable client
1118 with &lsquo;<tt>ffmpeg</tt>&rsquo;.
1119 </p><table><tr><td>&nbsp;</td><td><pre class="example"># Create a JACK writable client with name &quot;ffmpeg&quot;.
1120 $ ffmpeg -f jack -i ffmpeg -y out.wav
1121
1122 # Start the sample jack_metro readable client.
1123 $ jack_metro -b 120 -d 0.2 -f 4000
1124
1125 # List the current JACK clients.
1126 $ jack_lsp -c
1127 system:capture_1
1128 system:capture_2
1129 system:playback_1
1130 system:playback_2
1131 ffmpeg:input_1
1132 metro:120_bpm
1133
1134 # Connect metro to the ffmpeg writable client.
1135 $ jack_connect metro:120_bpm ffmpeg:input_1
1136 </pre></td></tr></table>
1137
1138 <p>For more information read:
1139 <a href="http://jackaudio.org/">http://jackaudio.org/</a>
1140 </p>
1141 <a name="lavfi"></a>
1142 <h2 class="section"><a href="ffprobe.html#toc-lavfi">8.6 lavfi</a></h2>
1143
1144 <p>Libavfilter input virtual device.
1145 </p>
1146 <p>This input device reads data from the open output pads of a libavfilter
1147 filtergraph.
1148 </p>
1149 <p>For each filtergraph open output, the input device will create a
1150 corresponding stream which is mapped to the generated output. Currently
1151 only video data is supported. The filtergraph is specified through the
1152 option &lsquo;<samp>graph</samp>&rsquo;.
1153 </p>
1154 <p>To enable this input device, you need to configure your build with
1155 <code>--enable-libavfilter</code>.
1156 </p>
1157 <a name="Options-1"></a>
1158 <h3 class="subsection"><a href="ffprobe.html#toc-Options-1">8.6.1 Options</a></h3>
1159
1160 <dl compact="compact">
1161 <dt> &lsquo;<samp>graph</samp>&rsquo;</dt>
1162 <dd><p>Specify the filtergraph to use as input. Each video open output must be
1163 labelled by a unique string of the form &quot;out<var>N</var>&quot;, where <var>N</var> is a
1164 number starting from 0 corresponding to the mapped input stream
1165 generated by the device.
1166 The first unlabelled output is automatically assigned to the &quot;out0&quot;
1167 label, but all the others need to be specified explicitely.
1168 </p>
1169 <p>If not specified defaults to the filename specified for the input
1170 device.
1171 </p></dd>
1172 </dl>
1173
1174 <a name="Examples"></a>
1175 <h3 class="subsection"><a href="ffprobe.html#toc-Examples">8.6.2 Examples</a></h3>
1176
1177 <ul>
1178 <li>
1179 Create a color video stream and play it back with &lsquo;<tt>ffplay</tt>&rsquo;:
1180 <table><tr><td>&nbsp;</td><td><pre class="example">ffplay -f lavfi -graph &quot;color=pink [out0]&quot; dummy
1181 </pre></td></tr></table>
1182
1183 </li><li>
1184 As the previous example, but use filename for specifying the graph
1185 description, and omit the &quot;out0&quot; label:
1186 <table><tr><td>&nbsp;</td><td><pre class="example">ffplay -f lavfi color=pink
1187 </pre></td></tr></table>
1188
1189 </li><li>
1190 Create three different video test filtered sources and play them:
1191 <table><tr><td>&nbsp;</td><td><pre class="example">ffplay -f lavfi -graph &quot;testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]&quot; test3
1192 </pre></td></tr></table>
1193 </li></ul>
1194
1195 <a name="libdc1394"></a>
1196 <h2 class="section"><a href="ffprobe.html#toc-libdc1394">8.7 libdc1394</a></h2>
1197
1198 <p>IIDC1394 input device, based on libdc1394 and libraw1394.
1199 </p>
1200 <a name="openal"></a>
1201 <h2 class="section"><a href="ffprobe.html#toc-openal">8.8 openal</a></h2>
1202
1203 <p>The OpenAL input device provides audio capture on all systems with a
1204 working OpenAL 1.1 implementation.
1205 </p>
1206 <p>To enable this input device during configuration, you need OpenAL
1207 headers and libraries installed on your system, and need to configure
1208 FFmpeg with <code>--enable-openal</code>.
1209 </p>
1210 <p>OpenAL headers and libraries should be provided as part of your OpenAL
1211 implementation, or as an additional download (an SDK). Depending on your
1212 installation you may need to specify additional flags via the
1213 <code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
1214 system to locate the OpenAL headers and libraries.
1215 </p>
1216 <p>An incomplete list of OpenAL implementations follows:
1217 </p>
1218 <dl compact="compact">
1219 <dt> <strong>Creative</strong></dt>
1220 <dd><p>The official Windows implementation, providing hardware acceleration
1221 with supported devices and software fallback.
1222 See <a href="http://openal.org/">http://openal.org/</a>.
1223 </p></dd>
1224 <dt> <strong>OpenAL Soft</strong></dt>
1225 <dd><p>Portable, open source (LGPL) software implementation. Includes
1226 backends for the most common sound APIs on the Windows, Linux,
1227 Solaris, and BSD operating systems.
1228 See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
1229 </p></dd>
1230 <dt> <strong>Apple</strong></dt>
1231 <dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
1232 See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
1233 </p></dd>
1234 </dl>
1235
1236 <p>This device allows to capture from an audio input device handled
1237 through OpenAL.
1238 </p>
1239 <p>You need to specify the name of the device to capture in the provided
1240 filename. If the empty string is provided, the device will
1241 automatically select the default device. You can get the list of the
1242 supported devices by using the option <var>list_devices</var>.
1243 </p>
1244 <a name="Options"></a>
1245 <h3 class="subsection"><a href="ffprobe.html#toc-Options">8.8.1 Options</a></h3>
1246
1247 <dl compact="compact">
1248 <dt> &lsquo;<samp>channels</samp>&rsquo;</dt>
1249 <dd><p>Set the number of channels in the captured audio. Only the values
1250 &lsquo;<samp>1</samp>&rsquo; (monaural) and &lsquo;<samp>2</samp>&rsquo; (stereo) are currently supported.
1251 Defaults to &lsquo;<samp>2</samp>&rsquo;.
1252 </p>
1253 </dd>
1254 <dt> &lsquo;<samp>sample_size</samp>&rsquo;</dt>
1255 <dd><p>Set the sample size (in bits) of the captured audio. Only the values
1256 &lsquo;<samp>8</samp>&rsquo; and &lsquo;<samp>16</samp>&rsquo; are currently supported. Defaults to
1257 &lsquo;<samp>16</samp>&rsquo;.
1258 </p>
1259 </dd>
1260 <dt> &lsquo;<samp>sample_rate</samp>&rsquo;</dt>
1261 <dd><p>Set the sample rate (in Hz) of the captured audio.
1262 Defaults to &lsquo;<samp>44.1k</samp>&rsquo;.
1263 </p>
1264 </dd>
1265 <dt> &lsquo;<samp>list_devices</samp>&rsquo;</dt>
1266 <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, print a list of devices and exit.
1267 Defaults to &lsquo;<samp>false</samp>&rsquo;.
1268 </p>
1269 </dd>
1270 </dl>
1271
1272 <a name="Examples-1"></a>
1273 <h3 class="subsection"><a href="ffprobe.html#toc-Examples-1">8.8.2 Examples</a></h3>
1274
1275 <p>Print the list of OpenAL supported devices and exit:
1276 </p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
1277 </pre></td></tr></table>
1278
1279 <p>Capture from the OpenAL device &lsquo;<tt>DR-BT101 via PulseAudio</tt>&rsquo;:
1280 </p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
1281 </pre></td></tr></table>
1282
1283 <p>Capture from the default device (note the empty string &rdquo; as filename):
1284 </p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i '' out.ogg
1285 </pre></td></tr></table>
1286
1287 <p>Capture from two devices simultaneously, writing to two different files,
1288 within the same &lsquo;<tt>ffmpeg</tt>&rsquo; command:
1289 </p><table><tr><td>&nbsp;</td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
1290 </pre></td></tr></table>
1291 <p>Note: not all OpenAL implementations support multiple simultaneous capture -
1292 try the latest OpenAL Soft if the above does not work.
1293 </p>
1294 <a name="oss"></a>
1295 <h2 class="section"><a href="ffprobe.html#toc-oss">8.9 oss</a></h2>
1296
1297 <p>Open Sound System input device.
1298 </p>
1299 <p>The filename to provide to the input device is the device node
1300 representing the OSS input device, and is usually set to
1301 &lsquo;<tt>/dev/dsp</tt>&rsquo;.
1302 </p>
1303 <p>For example to grab from &lsquo;<tt>/dev/dsp</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo; use the
1304 command:
1305 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
1306 </pre></td></tr></table>
1307
1308 <p>For more information about OSS see:
1309 <a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
1310 </p>
1311 <a name="sndio"></a>
1312 <h2 class="section"><a href="ffprobe.html#toc-sndio">8.10 sndio</a></h2>
1313
1314 <p>sndio input device.
1315 </p>
1316 <p>To enable this input device during configuration you need libsndio
1317 installed on your system.
1318 </p>
1319 <p>The filename to provide to the input device is the device node
1320 representing the sndio input device, and is usually set to
1321 &lsquo;<tt>/dev/audio0</tt>&rsquo;.
1322 </p>
1323 <p>For example to grab from &lsquo;<tt>/dev/audio0</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo; use the
1324 command:
1325 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
1326 </pre></td></tr></table>
1327
1328 <a name="video4linux-and-video4linux2"></a>
1329 <h2 class="section"><a href="ffprobe.html#toc-video4linux-and-video4linux2">8.11 video4linux and video4linux2</a></h2>
1330
1331 <p>Video4Linux and Video4Linux2 input video devices.
1332 </p>
1333 <p>The name of the device to grab is a file device node, usually Linux
1334 systems tend to automatically create such nodes when the device
1335 (e.g. an USB webcam) is plugged into the system, and has a name of the
1336 kind &lsquo;<tt>/dev/video<var>N</var></tt>&rsquo;, where <var>N</var> is a number associated to
1337 the device.
1338 </p>
1339 <p>Video4Linux and Video4Linux2 devices only support a limited set of
1340 <var>width</var>x<var>height</var> sizes and framerates. You can check which are
1341 supported for example with the command &lsquo;<tt>dov4l</tt>&rsquo; for Video4Linux
1342 devices and the command &lsquo;<tt>v4l-info</tt>&rsquo; for Video4Linux2 devices.
1343 </p>
1344 <p>If the size for the device is set to 0x0, the input device will
1345 try to autodetect the size to use.
1346 Only for the video4linux2 device, if the frame rate is set to 0/0 the
1347 input device will use the frame rate value already set in the driver.
1348 </p>
1349 <p>Video4Linux support is deprecated since Linux 2.6.30, and will be
1350 dropped in later versions.
1351 </p>
1352 <p>Follow some usage examples of the video4linux devices with the ff*
1353 tools.
1354 </p><table><tr><td>&nbsp;</td><td><pre class="example"># Grab and show the input of a video4linux device, frame rate is set
1355 # to the default of 25/1.
1356 ffplay -s 320x240 -f video4linux /dev/video0
1357
1358 # Grab and show the input of a video4linux2 device, autoadjust size.
1359 ffplay -f video4linux2 /dev/video0
1360
1361 # Grab and record the input of a video4linux2 device, autoadjust size,
1362 # frame rate value defaults to 0/0 so it is read from the video4linux2
1363 # driver.
1364 ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
1365 </pre></td></tr></table>
1366
1367 <a name="vfwcap"></a>
1368 <h2 class="section"><a href="ffprobe.html#toc-vfwcap">8.12 vfwcap</a></h2>
1369
1370 <p>VfW (Video for Windows) capture input device.
1371 </p>
1372 <p>The filename passed as input is the capture driver number, ranging from
1373 0 to 9. You may use &quot;list&quot; as filename to print a list of drivers. Any
1374 other filename will be interpreted as device number 0.
1375 </p>
1376 <a name="x11grab"></a>
1377 <h2 class="section"><a href="ffprobe.html#toc-x11grab">8.13 x11grab</a></h2>
1378
1379 <p>X11 video input device.
1380 </p>
1381 <p>This device allows to capture a region of an X11 display.
1382 </p>
1383 <p>The filename passed as input has the syntax:
1384 </p><table><tr><td>&nbsp;</td><td><pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
1385 </pre></td></tr></table>
1386
1387 <p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
1388 X11 display name of the screen to grab from. <var>hostname</var> can be
1389 ommitted, and defaults to &quot;localhost&quot;. The environment variable
1390 <code>DISPLAY</code> contains the default display name.
1391 </p>
1392 <p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
1393 area with respect to the top-left border of the X11 screen. They
1394 default to 0.
1395 </p>
1396 <p>Check the X11 documentation (e.g. man X) for more detailed information.
1397 </p>
1398 <p>Use the &lsquo;<tt>dpyinfo</tt>&rsquo; program for getting basic information about the
1399 properties of your X11 display (e.g. grep for &quot;name&quot; or &quot;dimensions&quot;).
1400 </p>
1401 <p>For example to grab from &lsquo;<tt>:0.0</tt>&rsquo; using &lsquo;<tt>ffmpeg</tt>&rsquo;:
1402 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
1403
1404 # Grab at position 10,20.
1405 ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
1406 </pre></td></tr></table>
1407
1408 <a name="follow_005fmouse-AVOption"></a>
1409 <h3 class="subsection"><a href="ffprobe.html#toc-follow_005fmouse-AVOption">8.13.1 <var>follow_mouse</var> AVOption</a></h3>
1410
1411 <p>The syntax is:
1412 </p><table><tr><td>&nbsp;</td><td><pre class="example">-follow_mouse centered|<var>PIXELS</var>
1413 </pre></td></tr></table>
1414
1415 <p>When it is specified with &quot;centered&quot;, the grabbing region follows the mouse
1416 pointer and keeps the pointer at the center of region; otherwise, the region
1417 follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
1418 zero) to the edge of region.
1419 </p>
1420 <p>For example:
1421 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
1422
1423 # Follows only when the mouse pointer reaches within 100 pixels to edge
1424 ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
1425 </pre></td></tr></table>
1426
1427 <a name="show_005fregion-AVOption"></a>
1428 <h3 class="subsection"><a href="ffprobe.html#toc-show_005fregion-AVOption">8.13.2 <var>show_region</var> AVOption</a></h3>
1429
1430 <p>The syntax is:
1431 </p><table><tr><td>&nbsp;</td><td><pre class="example">-show_region 1
1432 </pre></td></tr></table>
1433
1434 <p>If <var>show_region</var> AVOption is specified with <var>1</var>, then the grabbing
1435 region will be indicated on screen. With this option, it&rsquo;s easy to know what is
1436 being grabbed if only a portion of the screen is grabbed.
1437 </p>
1438 <p>For example:
1439 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
1440
1441 # With follow_mouse
1442 ffmpeg -f x11grab -follow_mouse centered -show_region 1  -r 25 -s cif -i :0.0 out.mpg
1443 </pre></td></tr></table>
1444
1445
1446
1447 <hr size="1">
1448 <p>
1449  <font size="-1">
1450   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>.
1451  </font>
1452  <br>
1453
1454 </p>
1455 </body>
1456 </html>