]> git.sesse.net Git - casparcg/blob - dependencies64/ffmpeg/doc/ffmpeg-devices.html
Merge branch '2.1.0' of https://github.com/CasparCG/Server into 2.1.0
[casparcg] / dependencies64 / ffmpeg / doc / ffmpeg-devices.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
4   <head>
5     <meta charset="utf-8">
6     <title>
7       FFmpeg Devices Documentation
8     </title>
9     <meta name="viewport" content="width=device-width,initial-scale=1.0">
10     <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
11     <link rel="stylesheet" type="text/css" href="style.min.css">
12   </head>
13   <body>
14     <div style="width: 95%; margin: auto">
15       <h1>
16       FFmpeg Devices Documentation
17       </h1>
18 <div align="center">
19 </div>
20
21
22 <a name="SEC_Top"></a>
23
24 <a name="SEC_Contents"></a>
25 <h2 class="contents-heading">Table of Contents</h2>
26
27 <div class="contents">
28
29 <ul class="no-bullet">
30   <li><a name="toc-Description" href="#Description">1 Description</a></li>
31   <li><a name="toc-Device-Options" href="#Device-Options">2 Device Options</a></li>
32   <li><a name="toc-Input-Devices" href="#Input-Devices">3 Input Devices</a>
33   <ul class="no-bullet">
34     <li><a name="toc-alsa" href="#alsa">3.1 alsa</a></li>
35     <li><a name="toc-avfoundation" href="#avfoundation">3.2 avfoundation</a>
36     <ul class="no-bullet">
37       <li><a name="toc-Options" href="#Options">3.2.1 Options</a></li>
38       <li><a name="toc-Examples" href="#Examples">3.2.2 Examples</a></li>
39     </ul></li>
40     <li><a name="toc-bktr" href="#bktr">3.3 bktr</a></li>
41     <li><a name="toc-decklink" href="#decklink">3.4 decklink</a>
42     <ul class="no-bullet">
43       <li><a name="toc-Options-1" href="#Options-1">3.4.1 Options</a></li>
44       <li><a name="toc-Examples-1" href="#Examples-1">3.4.2 Examples</a></li>
45     </ul></li>
46     <li><a name="toc-dshow" href="#dshow">3.5 dshow</a>
47     <ul class="no-bullet">
48       <li><a name="toc-Options-2" href="#Options-2">3.5.1 Options</a></li>
49       <li><a name="toc-Examples-2" href="#Examples-2">3.5.2 Examples</a></li>
50     </ul></li>
51     <li><a name="toc-dv1394" href="#dv1394">3.6 dv1394</a></li>
52     <li><a name="toc-fbdev" href="#fbdev">3.7 fbdev</a></li>
53     <li><a name="toc-gdigrab" href="#gdigrab">3.8 gdigrab</a>
54     <ul class="no-bullet">
55       <li><a name="toc-Options-3" href="#Options-3">3.8.1 Options</a></li>
56     </ul></li>
57     <li><a name="toc-iec61883" href="#iec61883">3.9 iec61883</a>
58     <ul class="no-bullet">
59       <li><a name="toc-Options-4" href="#Options-4">3.9.1 Options</a></li>
60       <li><a name="toc-Examples-3" href="#Examples-3">3.9.2 Examples</a></li>
61     </ul></li>
62     <li><a name="toc-jack" href="#jack">3.10 jack</a></li>
63     <li><a name="toc-lavfi" href="#lavfi">3.11 lavfi</a>
64     <ul class="no-bullet">
65       <li><a name="toc-Options-5" href="#Options-5">3.11.1 Options</a></li>
66       <li><a name="toc-Examples-4" href="#Examples-4">3.11.2 Examples</a></li>
67     </ul></li>
68     <li><a name="toc-libcdio" href="#libcdio">3.12 libcdio</a>
69     <ul class="no-bullet">
70       <li><a name="toc-Options-6" href="#Options-6">3.12.1 Options</a></li>
71     </ul></li>
72     <li><a name="toc-libdc1394" href="#libdc1394">3.13 libdc1394</a></li>
73     <li><a name="toc-openal" href="#openal">3.14 openal</a>
74     <ul class="no-bullet">
75       <li><a name="toc-Options-7" href="#Options-7">3.14.1 Options</a></li>
76       <li><a name="toc-Examples-5" href="#Examples-5">3.14.2 Examples</a></li>
77     </ul></li>
78     <li><a name="toc-oss" href="#oss">3.15 oss</a></li>
79     <li><a name="toc-pulse" href="#pulse">3.16 pulse</a>
80     <ul class="no-bullet">
81       <li><a name="toc-Options-8" href="#Options-8">3.16.1 Options</a></li>
82       <li><a name="toc-Examples-6" href="#Examples-6">3.16.2 Examples</a></li>
83     </ul></li>
84     <li><a name="toc-qtkit" href="#qtkit">3.17 qtkit</a></li>
85     <li><a name="toc-sndio" href="#sndio">3.18 sndio</a></li>
86     <li><a name="toc-video4linux2_002c-v4l2" href="#video4linux2_002c-v4l2">3.19 video4linux2, v4l2</a>
87     <ul class="no-bullet">
88       <li><a name="toc-Options-9" href="#Options-9">3.19.1 Options</a></li>
89     </ul></li>
90     <li><a name="toc-vfwcap" href="#vfwcap">3.20 vfwcap</a></li>
91     <li><a name="toc-x11grab" href="#x11grab">3.21 x11grab</a>
92     <ul class="no-bullet">
93       <li><a name="toc-Options-10" href="#Options-10">3.21.1 Options</a></li>
94       <li><a name="toc-grab_005fx-grab_005fy-AVOption" href="#grab_005fx-grab_005fy-AVOption">3.21.2 <var>grab_x</var> <var>grab_y</var> AVOption</a></li>
95     </ul></li>
96   </ul></li>
97   <li><a name="toc-Output-Devices" href="#Output-Devices">4 Output Devices</a>
98   <ul class="no-bullet">
99     <li><a name="toc-alsa-1" href="#alsa-1">4.1 alsa</a>
100     <ul class="no-bullet">
101       <li><a name="toc-Examples-7" href="#Examples-7">4.1.1 Examples</a></li>
102     </ul></li>
103     <li><a name="toc-caca" href="#caca">4.2 caca</a>
104     <ul class="no-bullet">
105       <li><a name="toc-Options-11" href="#Options-11">4.2.1 Options</a></li>
106       <li><a name="toc-Examples-8" href="#Examples-8">4.2.2 Examples</a></li>
107     </ul></li>
108     <li><a name="toc-decklink-1" href="#decklink-1">4.3 decklink</a>
109     <ul class="no-bullet">
110       <li><a name="toc-Options-12" href="#Options-12">4.3.1 Options</a></li>
111       <li><a name="toc-Examples-9" href="#Examples-9">4.3.2 Examples</a></li>
112     </ul></li>
113     <li><a name="toc-fbdev-1" href="#fbdev-1">4.4 fbdev</a>
114     <ul class="no-bullet">
115       <li><a name="toc-Options-13" href="#Options-13">4.4.1 Options</a></li>
116       <li><a name="toc-Examples-10" href="#Examples-10">4.4.2 Examples</a></li>
117     </ul></li>
118     <li><a name="toc-opengl" href="#opengl">4.5 opengl</a>
119     <ul class="no-bullet">
120       <li><a name="toc-Options-14" href="#Options-14">4.5.1 Options</a></li>
121       <li><a name="toc-Examples-11" href="#Examples-11">4.5.2 Examples</a></li>
122     </ul></li>
123     <li><a name="toc-oss-1" href="#oss-1">4.6 oss</a></li>
124     <li><a name="toc-pulse-1" href="#pulse-1">4.7 pulse</a>
125     <ul class="no-bullet">
126       <li><a name="toc-Options-15" href="#Options-15">4.7.1 Options</a></li>
127       <li><a name="toc-Examples-12" href="#Examples-12">4.7.2 Examples</a></li>
128     </ul></li>
129     <li><a name="toc-sdl" href="#sdl">4.8 sdl</a>
130     <ul class="no-bullet">
131       <li><a name="toc-Options-16" href="#Options-16">4.8.1 Options</a></li>
132       <li><a name="toc-Interactive-commands" href="#Interactive-commands">4.8.2 Interactive commands</a></li>
133       <li><a name="toc-Examples-13" href="#Examples-13">4.8.3 Examples</a></li>
134     </ul></li>
135     <li><a name="toc-sndio-1" href="#sndio-1">4.9 sndio</a></li>
136     <li><a name="toc-xv" href="#xv">4.10 xv</a>
137     <ul class="no-bullet">
138       <li><a name="toc-Options-17" href="#Options-17">4.10.1 Options</a></li>
139       <li><a name="toc-Examples-14" href="#Examples-14">4.10.2 Examples</a></li>
140     </ul></li>
141   </ul></li>
142   <li><a name="toc-See-Also" href="#See-Also">5 See Also</a></li>
143   <li><a name="toc-Authors" href="#Authors">6 Authors</a></li>
144 </ul>
145 </div>
146
147
148 <a name="Description"></a>
149 <h2 class="chapter">1 Description<span class="pull-right"><a class="anchor hidden-xs" href="#Description" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Description" aria-hidden="true">TOC</a></span></h2>
150
151 <p>This document describes the input and output devices provided by the
152 libavdevice library.
153 </p>
154
155 <a name="Device-Options"></a>
156 <h2 class="chapter">2 Device Options<span class="pull-right"><a class="anchor hidden-xs" href="#Device-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Device-Options" aria-hidden="true">TOC</a></span></h2>
157
158 <p>The libavdevice library provides the same interface as
159 libavformat. Namely, an input device is considered like a demuxer, and
160 an output device like a muxer, and the interface and generic device
161 options are the same provided by libavformat (see the ffmpeg-formats
162 manual).
163 </p>
164 <p>In addition each input or output device may support so-called private
165 options, which are specific for that component.
166 </p>
167 <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
168 FFmpeg tools, or by setting the value explicitly in the device
169 <code>AVFormatContext</code> options or using the <samp>libavutil/opt.h</samp> API
170 for programmatic use.
171 </p>
172
173 <a name="Input-Devices"></a>
174 <h2 class="chapter">3 Input Devices<span class="pull-right"><a class="anchor hidden-xs" href="#Input-Devices" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Input-Devices" aria-hidden="true">TOC</a></span></h2>
175
176 <p>Input devices are configured elements in FFmpeg which enable accessing
177 the data coming from a multimedia device attached to your system.
178 </p>
179 <p>When you configure your FFmpeg build, all the supported input devices
180 are enabled by default. You can list all available ones using the
181 configure option &quot;&ndash;list-indevs&quot;.
182 </p>
183 <p>You can disable all the input devices using the configure option
184 &quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the
185 option &quot;&ndash;enable-indev=<var>INDEV</var>&quot;, or you can disable a particular
186 input device using the option &quot;&ndash;disable-indev=<var>INDEV</var>&quot;.
187 </p>
188 <p>The option &quot;-devices&quot; of the ff* tools will display the list of
189 supported input devices.
190 </p>
191 <p>A description of the currently available input devices follows.
192 </p>
193 <a name="alsa"></a>
194 <h3 class="section">3.1 alsa<span class="pull-right"><a class="anchor hidden-xs" href="#alsa" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-alsa" aria-hidden="true">TOC</a></span></h3>
195
196 <p>ALSA (Advanced Linux Sound Architecture) input device.
197 </p>
198 <p>To enable this input device during configuration you need libasound
199 installed on your system.
200 </p>
201 <p>This device allows capturing from an ALSA device. The name of the
202 device to capture has to be an ALSA card identifier.
203 </p>
204 <p>An ALSA identifier has the syntax:
205 </p><div class="example">
206 <pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
207 </pre></div>
208
209 <p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
210 </p>
211 <p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
212 specify card number or identifier, device number and subdevice number
213 (-1 means any).
214 </p>
215 <p>To see the list of cards currently recognized by your system check the
216 files <samp>/proc/asound/cards</samp> and <samp>/proc/asound/devices</samp>.
217 </p>
218 <p>For example to capture with <code>ffmpeg</code> from an ALSA device with
219 card id 0, you may run the command:
220 </p><div class="example">
221 <pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
222 </pre></div>
223
224 <p>For more information see:
225 <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>
226 </p>
227 <a name="avfoundation"></a>
228 <h3 class="section">3.2 avfoundation<span class="pull-right"><a class="anchor hidden-xs" href="#avfoundation" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-avfoundation" aria-hidden="true">TOC</a></span></h3>
229
230 <p>AVFoundation input device.
231 </p>
232 <p>AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX &gt;= 10.7 as well as on iOS.
233 The older QTKit framework has been marked deprecated since OSX version 10.7.
234 </p>
235 <p>The input filename has to be given in the following syntax:
236 </p><div class="example">
237 <pre class="example">-i &quot;[[VIDEO]:[AUDIO]]&quot;
238 </pre></div>
239 <p>The first entry selects the video input while the latter selects the audio input.
240 The stream has to be specified by the device name or the device index as shown by the device list.
241 Alternatively, the video and/or audio input device can be chosen by index using the
242 <samp>
243     -video_device_index &lt;INDEX&gt;
244 </samp>
245 and/or
246 <samp>
247     -audio_device_index &lt;INDEX&gt;
248 </samp>
249 , overriding any
250 device name or index given in the input filename.
251 </p>
252 <p>All available devices can be enumerated by using <samp>-list_devices true</samp>, listing
253 all device names and corresponding indices.
254 </p>
255 <p>There are two device name aliases:
256 </p><dl compact="compact">
257 <dt><code>default</code></dt>
258 <dd><p>Select the AVFoundation default device of the corresponding type.
259 </p>
260 </dd>
261 <dt><code>none</code></dt>
262 <dd><p>Do not record the corresponding media type.
263 This is equivalent to specifying an empty device name or index.
264 </p>
265 </dd>
266 </dl>
267
268 <a name="Options"></a>
269 <h4 class="subsection">3.2.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options" aria-hidden="true">TOC</a></span></h4>
270
271 <p>AVFoundation supports the following options:
272 </p>
273 <dl compact="compact">
274 <dt><samp>-list_devices &lt;TRUE|FALSE&gt;</samp></dt>
275 <dd><p>If set to true, a list of all available input devices is given showing all
276 device names and indices.
277 </p>
278 </dd>
279 <dt><samp>-video_device_index &lt;INDEX&gt;</samp></dt>
280 <dd><p>Specify the video device by its index. Overrides anything given in the input filename.
281 </p>
282 </dd>
283 <dt><samp>-audio_device_index &lt;INDEX&gt;</samp></dt>
284 <dd><p>Specify the audio device by its index. Overrides anything given in the input filename.
285 </p>
286 </dd>
287 <dt><samp>-pixel_format &lt;FORMAT&gt;</samp></dt>
288 <dd><p>Request the video device to use a specific pixel format.
289 If the specified format is not supported, a list of available formats is given
290 und the first one in this list is used instead. Available pixel formats are:
291 <code>monob, rgb555be, rgb555le, rgb565be, rgb565le, rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
292  bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10,
293  yuv420p, nv12, yuyv422, gray</code>
294 </p>
295 </dd>
296 </dl>
297
298 <a name="Examples"></a>
299 <h4 class="subsection">3.2.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples" aria-hidden="true">TOC</a></span></h4>
300
301 <ul>
302 <li> Print the list of AVFoundation supported devices and exit:
303 <div class="example">
304 <pre class="example">$ ffmpeg -f avfoundation -list_devices true -i &quot;&quot;
305 </pre></div>
306
307 </li><li> Record video from video device 0 and audio from audio device 0 into out.avi:
308 <div class="example">
309 <pre class="example">$ ffmpeg -f avfoundation -i &quot;0:0&quot; out.avi
310 </pre></div>
311
312 </li><li> Record video from video device 2 and audio from audio device 1 into out.avi:
313 <div class="example">
314 <pre class="example">$ ffmpeg -f avfoundation -video_device_index 2 -i &quot;:1&quot; out.avi
315 </pre></div>
316
317 </li><li> Record video from the system default video device using the pixel format bgr0 and do not record any audio into out.avi:
318 <div class="example">
319 <pre class="example">$ ffmpeg -f avfoundation -pixel_format bgr0 -i &quot;default:none&quot; out.avi
320 </pre></div>
321
322 </li></ul>
323
324 <a name="bktr"></a>
325 <h3 class="section">3.3 bktr<span class="pull-right"><a class="anchor hidden-xs" href="#bktr" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bktr" aria-hidden="true">TOC</a></span></h3>
326
327 <p>BSD video input device.
328 </p>
329 <a name="decklink"></a>
330 <h3 class="section">3.4 decklink<span class="pull-right"><a class="anchor hidden-xs" href="#decklink" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-decklink" aria-hidden="true">TOC</a></span></h3>
331
332 <p>The decklink input device provides capture capabilities for Blackmagic
333 DeckLink devices.
334 </p>
335 <p>To enable this input device, you need the Blackmagic DeckLink SDK and you
336 need to configure with the appropriate <code>--extra-cflags</code>
337 and <code>--extra-ldflags</code>.
338 On Windows, you need to run the IDL files through <code>widl</code>.
339 </p>
340 <p>DeckLink is very picky about the formats it supports. Pixel format is
341 uyvy422 or v210, framerate and video size must be determined for your device with
342 <code>-list_formats 1</code>. Audio sample rate is always 48 kHz and the number
343 of channels can be 2, 8 or 16.
344 </p>
345 <a name="Options-1"></a>
346 <h4 class="subsection">3.4.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-1" aria-hidden="true">TOC</a></span></h4>
347
348 <dl compact="compact">
349 <dt><samp>list_devices</samp></dt>
350 <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
351 Defaults to <samp>false</samp>.
352 </p>
353 </dd>
354 <dt><samp>list_formats</samp></dt>
355 <dd><p>If set to <samp>true</samp>, print a list of supported formats and exit.
356 Defaults to <samp>false</samp>.
357 </p>
358 </dd>
359 <dt><samp>bm_v210</samp></dt>
360 <dd><p>If set to &lsquo;<samp>1</samp>&rsquo;, video is captured in 10 bit v210 instead
361 of uyvy422. Not all Blackmagic devices support this option.
362 </p>
363 </dd>
364 </dl>
365
366 <a name="Examples-1"></a>
367 <h4 class="subsection">3.4.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-1" aria-hidden="true">TOC</a></span></h4>
368
369 <ul>
370 <li> List input devices:
371 <div class="example">
372 <pre class="example">ffmpeg -f decklink -list_devices 1 -i dummy
373 </pre></div>
374
375 </li><li> List supported formats:
376 <div class="example">
377 <pre class="example">ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
378 </pre></div>
379
380 </li><li> Capture video clip at 1080i50 (format 11):
381 <div class="example">
382 <pre class="example">ffmpeg -f decklink -i 'Intensity Pro@11' -acodec copy -vcodec copy output.avi
383 </pre></div>
384
385 </li><li> Capture video clip at 1080i50 10 bit:
386 <div class="example">
387 <pre class="example">ffmpeg -bm_v210 1 -f decklink -i 'UltraStudio Mini Recorder@11' -acodec copy -vcodec copy output.avi
388 </pre></div>
389
390 </li><li> Capture video clip at 720p50 with 32bit audio:
391 <div class="example">
392 <pre class="example">ffmpeg -bm_audiodepth 32 -f decklink -i 'UltraStudio Mini Recorder@14' -acodec copy -vcodec copy output.avi
393 </pre></div>
394
395 </li><li> Capture video clip at 576i50 with 8 audio channels:
396 <div class="example">
397 <pre class="example">ffmpeg -bm_channels 8 -f decklink -i 'UltraStudio Mini Recorder@3' -acodec copy -vcodec copy output.avi
398 </pre></div>
399
400 </li></ul>
401
402 <a name="dshow"></a>
403 <h3 class="section">3.5 dshow<span class="pull-right"><a class="anchor hidden-xs" href="#dshow" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dshow" aria-hidden="true">TOC</a></span></h3>
404
405 <p>Windows DirectShow input device.
406 </p>
407 <p>DirectShow support is enabled when FFmpeg is built with the mingw-w64 project.
408 Currently only audio and video devices are supported.
409 </p>
410 <p>Multiple devices may be opened as separate inputs, but they may also be
411 opened on the same input, which should improve synchronism between them.
412 </p>
413 <p>The input name should be in the format:
414 </p>
415 <div class="example">
416 <pre class="example"><var>TYPE</var>=<var>NAME</var>[:<var>TYPE</var>=<var>NAME</var>]
417 </pre></div>
418
419 <p>where <var>TYPE</var> can be either <var>audio</var> or <var>video</var>,
420 and <var>NAME</var> is the device&rsquo;s name or alternative name..
421 </p>
422 <a name="Options-2"></a>
423 <h4 class="subsection">3.5.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-2" aria-hidden="true">TOC</a></span></h4>
424
425 <p>If no options are specified, the device&rsquo;s defaults are used.
426 If the device does not support the requested options, it will
427 fail to open.
428 </p>
429 <dl compact="compact">
430 <dt><samp>video_size</samp></dt>
431 <dd><p>Set the video size in the captured video.
432 </p>
433 </dd>
434 <dt><samp>framerate</samp></dt>
435 <dd><p>Set the frame rate in the captured video.
436 </p>
437 </dd>
438 <dt><samp>sample_rate</samp></dt>
439 <dd><p>Set the sample rate (in Hz) of the captured audio.
440 </p>
441 </dd>
442 <dt><samp>sample_size</samp></dt>
443 <dd><p>Set the sample size (in bits) of the captured audio.
444 </p>
445 </dd>
446 <dt><samp>channels</samp></dt>
447 <dd><p>Set the number of channels in the captured audio.
448 </p>
449 </dd>
450 <dt><samp>list_devices</samp></dt>
451 <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
452 </p>
453 </dd>
454 <dt><samp>list_options</samp></dt>
455 <dd><p>If set to <samp>true</samp>, print a list of selected device&rsquo;s options
456 and exit.
457 </p>
458 </dd>
459 <dt><samp>video_device_number</samp></dt>
460 <dd><p>Set video device number for devices with same name (starts at 0,
461 defaults to 0).
462 </p>
463 </dd>
464 <dt><samp>audio_device_number</samp></dt>
465 <dd><p>Set audio device number for devices with same name (starts at 0,
466 defaults to 0).
467 </p>
468 </dd>
469 <dt><samp>pixel_format</samp></dt>
470 <dd><p>Select pixel format to be used by DirectShow. This may only be set when
471 the video codec is not set or set to rawvideo.
472 </p>
473 </dd>
474 <dt><samp>audio_buffer_size</samp></dt>
475 <dd><p>Set audio device buffer size in milliseconds (which can directly
476 impact latency, depending on the device).
477 Defaults to using the audio device&rsquo;s
478 default buffer size (typically some multiple of 500ms).
479 Setting this value too low can degrade performance.
480 See also
481 <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx</a>
482 </p>
483 </dd>
484 <dt><samp>video_pin_name</samp></dt>
485 <dd><p>Select video capture pin to use by name or alternative name.
486 </p>
487 </dd>
488 <dt><samp>audio_pin_name</samp></dt>
489 <dd><p>Select audio capture pin to use by name or alternative name.
490 </p>
491 </dd>
492 <dt><samp>crossbar_video_input_pin_number</samp></dt>
493 <dd><p>Select video input pin number for crossbar device. This will be
494 routed to the crossbar device&rsquo;s Video Decoder output pin.
495 Note that changing this value can affect future invocations
496 (sets a new default) until system reboot occurs.
497 </p>
498 </dd>
499 <dt><samp>crossbar_audio_input_pin_number</samp></dt>
500 <dd><p>Select audio input pin number for crossbar device. This will be
501 routed to the crossbar device&rsquo;s Audio Decoder output pin.
502 Note that changing this value can affect future invocations
503 (sets a new default) until system reboot occurs.
504 </p>
505 </dd>
506 <dt><samp>show_video_device_dialog</samp></dt>
507 <dd><p>If set to <samp>true</samp>, before capture starts, popup a display dialog
508 to the end user, allowing them to change video filter properties
509 and configurations manually.
510 Note that for crossbar devices, adjusting values in this dialog
511 may be needed at times to toggle between PAL (25 fps) and NTSC (29.97)
512 input frame rates, sizes, interlacing, etc.  Changing these values can
513 enable different scan rates/frame rates and avoiding green bars at
514 the bottom, flickering scan lines, etc.
515 Note that with some devices, changing these properties can also affect future
516 invocations (sets new defaults) until system reboot occurs.
517 </p>
518 </dd>
519 <dt><samp>show_audio_device_dialog</samp></dt>
520 <dd><p>If set to <samp>true</samp>, before capture starts, popup a display dialog
521 to the end user, allowing them to change audio filter properties
522 and configurations manually.
523 </p>
524 </dd>
525 <dt><samp>show_video_crossbar_connection_dialog</samp></dt>
526 <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
527 dialog to the end user, allowing them to manually
528 modify crossbar pin routings, when it opens a video device.
529 </p>
530 </dd>
531 <dt><samp>show_audio_crossbar_connection_dialog</samp></dt>
532 <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
533 dialog to the end user, allowing them to manually
534 modify crossbar pin routings, when it opens an audio device.
535 </p>
536 </dd>
537 <dt><samp>show_analog_tv_tuner_dialog</samp></dt>
538 <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
539 dialog to the end user, allowing them to manually
540 modify TV channels and frequencies.
541 </p>
542 </dd>
543 <dt><samp>show_analog_tv_tuner_audio_dialog</samp></dt>
544 <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
545 dialog to the end user, allowing them to manually
546 modify TV audio (like mono vs. stereo, Language A,B or C).
547 </p>
548 </dd>
549 <dt><samp>audio_device_load</samp></dt>
550 <dd><p>Load an audio capture filter device from file instead of searching
551 it by name. It may load additional parameters too, if the filter
552 supports the serialization of its properties to.
553 To use this an audio capture source has to be specified, but it can
554 be anything even fake one.
555 </p>
556 </dd>
557 <dt><samp>audio_device_save</samp></dt>
558 <dd><p>Save the currently used audio capture filter device and its
559 parameters (if the filter supports it) to a file.
560 If a file with the same name exists it will be overwritten.
561 </p>
562 </dd>
563 <dt><samp>video_device_load</samp></dt>
564 <dd><p>Load a video capture filter device from file instead of searching
565 it by name. It may load additional parameters too, if the filter
566 supports the serialization of its properties to.
567 To use this a video capture source has to be specified, but it can
568 be anything even fake one.
569 </p>
570 </dd>
571 <dt><samp>video_device_save</samp></dt>
572 <dd><p>Save the currently used video capture filter device and its
573 parameters (if the filter supports it) to a file.
574 If a file with the same name exists it will be overwritten.
575 </p>
576 </dd>
577 </dl>
578
579 <a name="Examples-2"></a>
580 <h4 class="subsection">3.5.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-2" aria-hidden="true">TOC</a></span></h4>
581
582 <ul>
583 <li> Print the list of DirectShow supported devices and exit:
584 <div class="example">
585 <pre class="example">$ ffmpeg -list_devices true -f dshow -i dummy
586 </pre></div>
587
588 </li><li> Open video device <var>Camera</var>:
589 <div class="example">
590 <pre class="example">$ ffmpeg -f dshow -i video=&quot;Camera&quot;
591 </pre></div>
592
593 </li><li> Open second video device with name <var>Camera</var>:
594 <div class="example">
595 <pre class="example">$ ffmpeg -f dshow -video_device_number 1 -i video=&quot;Camera&quot;
596 </pre></div>
597
598 </li><li> Open video device <var>Camera</var> and audio device <var>Microphone</var>:
599 <div class="example">
600 <pre class="example">$ ffmpeg -f dshow -i video=&quot;Camera&quot;:audio=&quot;Microphone&quot;
601 </pre></div>
602
603 </li><li> Print the list of supported options in selected device and exit:
604 <div class="example">
605 <pre class="example">$ ffmpeg -list_options true -f dshow -i video=&quot;Camera&quot;
606 </pre></div>
607
608 </li><li> Specify pin names to capture by name or alternative name, specify alternative device name:
609 <div class="example">
610 <pre class="example">$ ffmpeg -f dshow -audio_pin_name &quot;Audio Out&quot; -video_pin_name 2 -i video=video=&quot;@device_pnp_\\?\pci#ven_1a0a&amp;dev_6200&amp;subsys_62021461&amp;rev_01#4&amp;e2c7dd6&amp;0&amp;00e1#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6}&quot;:audio=&quot;Microphone&quot;
611 </pre></div>
612
613 </li><li> Configure a crossbar device, specifying crossbar pins, allow user to adjust video capture properties at startup:
614 <div class="example">
615 <pre class="example">$ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
616      -crossbar_audio_input_pin_number 3 -i video=&quot;AVerMedia BDA Analog Capture&quot;:audio=&quot;AVerMedia BDA Analog Capture&quot;
617 </pre></div>
618
619 </li></ul>
620
621 <a name="dv1394"></a>
622 <h3 class="section">3.6 dv1394<span class="pull-right"><a class="anchor hidden-xs" href="#dv1394" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dv1394" aria-hidden="true">TOC</a></span></h3>
623
624 <p>Linux DV 1394 input device.
625 </p>
626 <a name="fbdev"></a>
627 <h3 class="section">3.7 fbdev<span class="pull-right"><a class="anchor hidden-xs" href="#fbdev" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fbdev" aria-hidden="true">TOC</a></span></h3>
628
629 <p>Linux framebuffer input device.
630 </p>
631 <p>The Linux framebuffer is a graphic hardware-independent abstraction
632 layer to show graphics on a computer monitor, typically on the
633 console. It is accessed through a file device node, usually
634 <samp>/dev/fb0</samp>.
635 </p>
636 <p>For more detailed information read the file
637 Documentation/fb/framebuffer.txt included in the Linux source tree.
638 </p>
639 <p>To record from the framebuffer device <samp>/dev/fb0</samp> with
640 <code>ffmpeg</code>:
641 </p><div class="example">
642 <pre class="example">ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
643 </pre></div>
644
645 <p>You can take a single screenshot image with the command:
646 </p><div class="example">
647 <pre class="example">ffmpeg -f fbdev -frames:v 1 -r 1 -i /dev/fb0 screenshot.jpeg
648 </pre></div>
649
650 <p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
651 </p>
652 <a name="gdigrab"></a>
653 <h3 class="section">3.8 gdigrab<span class="pull-right"><a class="anchor hidden-xs" href="#gdigrab" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gdigrab" aria-hidden="true">TOC</a></span></h3>
654
655 <p>Win32 GDI-based screen capture device.
656 </p>
657 <p>This device allows you to capture a region of the display on Windows.
658 </p>
659 <p>There are two options for the input filename:
660 </p><div class="example">
661 <pre class="example">desktop
662 </pre></div>
663 <p>or
664 </p><div class="example">
665 <pre class="example">title=<var>window_title</var>
666 </pre></div>
667
668 <p>The first option will capture the entire desktop, or a fixed region of the
669 desktop. The second option will instead capture the contents of a single
670 window, regardless of its position on the screen.
671 </p>
672 <p>For example, to grab the entire desktop using <code>ffmpeg</code>:
673 </p><div class="example">
674 <pre class="example">ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
675 </pre></div>
676
677 <p>Grab a 640x480 region at position <code>10,20</code>:
678 </p><div class="example">
679 <pre class="example">ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
680 </pre></div>
681
682 <p>Grab the contents of the window named &quot;Calculator&quot;
683 </p><div class="example">
684 <pre class="example">ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
685 </pre></div>
686
687 <a name="Options-3"></a>
688 <h4 class="subsection">3.8.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-3" aria-hidden="true">TOC</a></span></h4>
689
690 <dl compact="compact">
691 <dt><samp>draw_mouse</samp></dt>
692 <dd><p>Specify whether to draw the mouse pointer. Use the value <code>0</code> to
693 not draw the pointer. Default value is <code>1</code>.
694 </p>
695 </dd>
696 <dt><samp>framerate</samp></dt>
697 <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
698 corresponding to a frame rate of <code>30000/1001</code>.
699 </p>
700 </dd>
701 <dt><samp>show_region</samp></dt>
702 <dd><p>Show grabbed region on screen.
703 </p>
704 <p>If <var>show_region</var> is specified with <code>1</code>, then the grabbing
705 region will be indicated on screen. With this option, it is easy to
706 know what is being grabbed if only a portion of the screen is grabbed.
707 </p>
708 <p>Note that <var>show_region</var> is incompatible with grabbing the contents
709 of a single window.
710 </p>
711 <p>For example:
712 </p><div class="example">
713 <pre class="example">ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
714 </pre></div>
715
716 </dd>
717 <dt><samp>video_size</samp></dt>
718 <dd><p>Set the video frame size. The default is to capture the full screen if <samp>desktop</samp> is selected, or the full window size if <samp>title=<var>window_title</var></samp> is selected.
719 </p>
720 </dd>
721 <dt><samp>offset_x</samp></dt>
722 <dd><p>When capturing a region with <var>video_size</var>, set the distance from the left edge of the screen or desktop.
723 </p>
724 <p>Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned to the left of your primary monitor, you will need to use a negative <var>offset_x</var> value to move the region to that monitor.
725 </p>
726 </dd>
727 <dt><samp>offset_y</samp></dt>
728 <dd><p>When capturing a region with <var>video_size</var>, set the distance from the top edge of the screen or desktop.
729 </p>
730 <p>Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned above your primary monitor, you will need to use a negative <var>offset_y</var> value to move the region to that monitor.
731 </p>
732 </dd>
733 </dl>
734
735 <a name="iec61883"></a>
736 <h3 class="section">3.9 iec61883<span class="pull-right"><a class="anchor hidden-xs" href="#iec61883" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-iec61883" aria-hidden="true">TOC</a></span></h3>
737
738 <p>FireWire DV/HDV input device using libiec61883.
739 </p>
740 <p>To enable this input device, you need libiec61883, libraw1394 and
741 libavc1394 installed on your system. Use the configure option
742 <code>--enable-libiec61883</code> to compile with the device enabled.
743 </p>
744 <p>The iec61883 capture device supports capturing from a video device
745 connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
746 FireWire stack (juju). This is the default DV/HDV input method in Linux
747 Kernel 2.6.37 and later, since the old FireWire stack was removed.
748 </p>
749 <p>Specify the FireWire port to be used as input file, or &quot;auto&quot;
750 to choose the first port connected.
751 </p>
752 <a name="Options-4"></a>
753 <h4 class="subsection">3.9.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-4" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-4" aria-hidden="true">TOC</a></span></h4>
754
755 <dl compact="compact">
756 <dt><samp>dvtype</samp></dt>
757 <dd><p>Override autodetection of DV/HDV. This should only be used if auto
758 detection does not work, or if usage of a different device type
759 should be prohibited. Treating a DV device as HDV (or vice versa) will
760 not work and result in undefined behavior.
761 The values <samp>auto</samp>, <samp>dv</samp> and <samp>hdv</samp> are supported.
762 </p>
763 </dd>
764 <dt><samp>dvbuffer</samp></dt>
765 <dd><p>Set maximum size of buffer for incoming data, in frames. For DV, this
766 is an exact value. For HDV, it is not frame exact, since HDV does
767 not have a fixed frame size.
768 </p>
769 </dd>
770 <dt><samp>dvguid</samp></dt>
771 <dd><p>Select the capture device by specifying it&rsquo;s GUID. Capturing will only
772 be performed from the specified device and fails if no device with the
773 given GUID is found. This is useful to select the input if multiple
774 devices are connected at the same time.
775 Look at /sys/bus/firewire/devices to find out the GUIDs.
776 </p>
777 </dd>
778 </dl>
779
780 <a name="Examples-3"></a>
781 <h4 class="subsection">3.9.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-3" aria-hidden="true">TOC</a></span></h4>
782
783 <ul>
784 <li> Grab and show the input of a FireWire DV/HDV device.
785 <div class="example">
786 <pre class="example">ffplay -f iec61883 -i auto
787 </pre></div>
788
789 </li><li> Grab and record the input of a FireWire DV/HDV device,
790 using a packet buffer of 100000 packets if the source is HDV.
791 <div class="example">
792 <pre class="example">ffmpeg -f iec61883 -i auto -hdvbuffer 100000 out.mpg
793 </pre></div>
794
795 </li></ul>
796
797 <a name="jack"></a>
798 <h3 class="section">3.10 jack<span class="pull-right"><a class="anchor hidden-xs" href="#jack" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-jack" aria-hidden="true">TOC</a></span></h3>
799
800 <p>JACK input device.
801 </p>
802 <p>To enable this input device during configuration you need libjack
803 installed on your system.
804 </p>
805 <p>A JACK input device creates one or more JACK writable clients, one for
806 each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
807 <var>client_name</var> is the name provided by the application, and <var>N</var>
808 is a number which identifies the channel.
809 Each writable client will send the acquired data to the FFmpeg input
810 device.
811 </p>
812 <p>Once you have created one or more JACK readable clients, you need to
813 connect them to one or more JACK writable clients.
814 </p>
815 <p>To connect or disconnect JACK clients you can use the <code>jack_connect</code>
816 and <code>jack_disconnect</code> programs, or do it through a graphical interface,
817 for example with <code>qjackctl</code>.
818 </p>
819 <p>To list the JACK clients and their properties you can invoke the command
820 <code>jack_lsp</code>.
821 </p>
822 <p>Follows an example which shows how to capture a JACK readable client
823 with <code>ffmpeg</code>.
824 </p><div class="example">
825 <pre class="example"># Create a JACK writable client with name &quot;ffmpeg&quot;.
826 $ ffmpeg -f jack -i ffmpeg -y out.wav
827
828 # Start the sample jack_metro readable client.
829 $ jack_metro -b 120 -d 0.2 -f 4000
830
831 # List the current JACK clients.
832 $ jack_lsp -c
833 system:capture_1
834 system:capture_2
835 system:playback_1
836 system:playback_2
837 ffmpeg:input_1
838 metro:120_bpm
839
840 # Connect metro to the ffmpeg writable client.
841 $ jack_connect metro:120_bpm ffmpeg:input_1
842 </pre></div>
843
844 <p>For more information read:
845 <a href="http://jackaudio.org/">http://jackaudio.org/</a>
846 </p>
847 <a name="lavfi"></a>
848 <h3 class="section">3.11 lavfi<span class="pull-right"><a class="anchor hidden-xs" href="#lavfi" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lavfi" aria-hidden="true">TOC</a></span></h3>
849
850 <p>Libavfilter input virtual device.
851 </p>
852 <p>This input device reads data from the open output pads of a libavfilter
853 filtergraph.
854 </p>
855 <p>For each filtergraph open output, the input device will create a
856 corresponding stream which is mapped to the generated output. Currently
857 only video data is supported. The filtergraph is specified through the
858 option <samp>graph</samp>.
859 </p>
860 <a name="Options-5"></a>
861 <h4 class="subsection">3.11.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-5" aria-hidden="true">TOC</a></span></h4>
862
863 <dl compact="compact">
864 <dt><samp>graph</samp></dt>
865 <dd><p>Specify the filtergraph to use as input. Each video open output must be
866 labelled by a unique string of the form &quot;out<var>N</var>&quot;, where <var>N</var> is a
867 number starting from 0 corresponding to the mapped input stream
868 generated by the device.
869 The first unlabelled output is automatically assigned to the &quot;out0&quot;
870 label, but all the others need to be specified explicitly.
871 </p>
872 <p>The suffix &quot;+subcc&quot; can be appended to the output label to create an extra
873 stream with the closed captions packets attached to that output
874 (experimental; only for EIA-608 / CEA-708 for now).
875 The subcc streams are created after all the normal streams, in the order of
876 the corresponding stream.
877 For example, if there is &quot;out19+subcc&quot;, &quot;out7+subcc&quot; and up to &quot;out42&quot;, the
878 stream #43 is subcc for stream #7 and stream #44 is subcc for stream #19.
879 </p>
880 <p>If not specified defaults to the filename specified for the input
881 device.
882 </p>
883 </dd>
884 <dt><samp>graph_file</samp></dt>
885 <dd><p>Set the filename of the filtergraph to be read and sent to the other
886 filters. Syntax of the filtergraph is the same as the one specified by
887 the option <var>graph</var>.
888 </p>
889 </dd>
890 </dl>
891
892 <a name="Examples-4"></a>
893 <h4 class="subsection">3.11.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-4" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-4" aria-hidden="true">TOC</a></span></h4>
894
895 <ul>
896 <li> Create a color video stream and play it back with <code>ffplay</code>:
897 <div class="example">
898 <pre class="example">ffplay -f lavfi -graph &quot;color=c=pink [out0]&quot; dummy
899 </pre></div>
900
901 </li><li> As the previous example, but use filename for specifying the graph
902 description, and omit the &quot;out0&quot; label:
903 <div class="example">
904 <pre class="example">ffplay -f lavfi color=c=pink
905 </pre></div>
906
907 </li><li> Create three different video test filtered sources and play them:
908 <div class="example">
909 <pre class="example">ffplay -f lavfi -graph &quot;testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]&quot; test3
910 </pre></div>
911
912 </li><li> Read an audio stream from a file using the amovie source and play it
913 back with <code>ffplay</code>:
914 <div class="example">
915 <pre class="example">ffplay -f lavfi &quot;amovie=test.wav&quot;
916 </pre></div>
917
918 </li><li> Read an audio stream and a video stream and play it back with
919 <code>ffplay</code>:
920 <div class="example">
921 <pre class="example">ffplay -f lavfi &quot;movie=test.avi[out0];amovie=test.wav[out1]&quot;
922 </pre></div>
923
924 </li><li> Dump decoded frames to images and closed captions to a file (experimental):
925 <div class="example">
926 <pre class="example">ffmpeg -f lavfi -i &quot;movie=test.ts[out0+subcc]&quot; -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin
927 </pre></div>
928
929 </li></ul>
930
931 <a name="libcdio"></a>
932 <h3 class="section">3.12 libcdio<span class="pull-right"><a class="anchor hidden-xs" href="#libcdio" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libcdio" aria-hidden="true">TOC</a></span></h3>
933
934 <p>Audio-CD input device based on libcdio.
935 </p>
936 <p>To enable this input device during configuration you need libcdio
937 installed on your system. It requires the configure option
938 <code>--enable-libcdio</code>.
939 </p>
940 <p>This device allows playing and grabbing from an Audio-CD.
941 </p>
942 <p>For example to copy with <code>ffmpeg</code> the entire Audio-CD in <samp>/dev/sr0</samp>,
943 you may run the command:
944 </p><div class="example">
945 <pre class="example">ffmpeg -f libcdio -i /dev/sr0 cd.wav
946 </pre></div>
947
948 <a name="Options-6"></a>
949 <h4 class="subsection">3.12.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-6" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-6" aria-hidden="true">TOC</a></span></h4>
950 <dl compact="compact">
951 <dt><samp>speed</samp></dt>
952 <dd><p>Set drive reading speed. Default value is 0.
953 </p>
954 <p>The speed is specified CD-ROM speed units. The speed is set through
955 the libcdio <code>cdio_cddap_speed_set</code> function. On many CD-ROM
956 drives, specifying a value too large will result in using the fastest
957 speed.
958 </p>
959 </dd>
960 <dt><samp>paranoia_mode</samp></dt>
961 <dd><p>Set paranoia recovery mode flags. It accepts one of the following values:
962 </p>
963 <dl compact="compact">
964 <dt>&lsquo;<samp>disable</samp>&rsquo;</dt>
965 <dt>&lsquo;<samp>verify</samp>&rsquo;</dt>
966 <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
967 <dt>&lsquo;<samp>neverskip</samp>&rsquo;</dt>
968 <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
969 </dl>
970
971 <p>Default value is &lsquo;<samp>disable</samp>&rsquo;.
972 </p>
973 <p>For more information about the available recovery modes, consult the
974 paranoia project documentation.
975 </p></dd>
976 </dl>
977
978 <a name="libdc1394"></a>
979 <h3 class="section">3.13 libdc1394<span class="pull-right"><a class="anchor hidden-xs" href="#libdc1394" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libdc1394" aria-hidden="true">TOC</a></span></h3>
980
981 <p>IIDC1394 input device, based on libdc1394 and libraw1394.
982 </p>
983 <p>Requires the configure option <code>--enable-libdc1394</code>.
984 </p>
985 <a name="openal"></a>
986 <h3 class="section">3.14 openal<span class="pull-right"><a class="anchor hidden-xs" href="#openal" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-openal" aria-hidden="true">TOC</a></span></h3>
987
988 <p>The OpenAL input device provides audio capture on all systems with a
989 working OpenAL 1.1 implementation.
990 </p>
991 <p>To enable this input device during configuration, you need OpenAL
992 headers and libraries installed on your system, and need to configure
993 FFmpeg with <code>--enable-openal</code>.
994 </p>
995 <p>OpenAL headers and libraries should be provided as part of your OpenAL
996 implementation, or as an additional download (an SDK). Depending on your
997 installation you may need to specify additional flags via the
998 <code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
999 system to locate the OpenAL headers and libraries.
1000 </p>
1001 <p>An incomplete list of OpenAL implementations follows:
1002 </p>
1003 <dl compact="compact">
1004 <dt><strong>Creative</strong></dt>
1005 <dd><p>The official Windows implementation, providing hardware acceleration
1006 with supported devices and software fallback.
1007 See <a href="http://openal.org/">http://openal.org/</a>.
1008 </p></dd>
1009 <dt><strong>OpenAL Soft</strong></dt>
1010 <dd><p>Portable, open source (LGPL) software implementation. Includes
1011 backends for the most common sound APIs on the Windows, Linux,
1012 Solaris, and BSD operating systems.
1013 See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
1014 </p></dd>
1015 <dt><strong>Apple</strong></dt>
1016 <dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
1017 See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
1018 </p></dd>
1019 </dl>
1020
1021 <p>This device allows one to capture from an audio input device handled
1022 through OpenAL.
1023 </p>
1024 <p>You need to specify the name of the device to capture in the provided
1025 filename. If the empty string is provided, the device will
1026 automatically select the default device. You can get the list of the
1027 supported devices by using the option <var>list_devices</var>.
1028 </p>
1029 <a name="Options-7"></a>
1030 <h4 class="subsection">3.14.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-7" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-7" aria-hidden="true">TOC</a></span></h4>
1031
1032 <dl compact="compact">
1033 <dt><samp>channels</samp></dt>
1034 <dd><p>Set the number of channels in the captured audio. Only the values
1035 <samp>1</samp> (monaural) and <samp>2</samp> (stereo) are currently supported.
1036 Defaults to <samp>2</samp>.
1037 </p>
1038 </dd>
1039 <dt><samp>sample_size</samp></dt>
1040 <dd><p>Set the sample size (in bits) of the captured audio. Only the values
1041 <samp>8</samp> and <samp>16</samp> are currently supported. Defaults to
1042 <samp>16</samp>.
1043 </p>
1044 </dd>
1045 <dt><samp>sample_rate</samp></dt>
1046 <dd><p>Set the sample rate (in Hz) of the captured audio.
1047 Defaults to <samp>44.1k</samp>.
1048 </p>
1049 </dd>
1050 <dt><samp>list_devices</samp></dt>
1051 <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
1052 Defaults to <samp>false</samp>.
1053 </p>
1054 </dd>
1055 </dl>
1056
1057 <a name="Examples-5"></a>
1058 <h4 class="subsection">3.14.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-5" aria-hidden="true">TOC</a></span></h4>
1059
1060 <p>Print the list of OpenAL supported devices and exit:
1061 </p><div class="example">
1062 <pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
1063 </pre></div>
1064
1065 <p>Capture from the OpenAL device <samp>DR-BT101 via PulseAudio</samp>:
1066 </p><div class="example">
1067 <pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
1068 </pre></div>
1069
1070 <p>Capture from the default device (note the empty string &rdquo; as filename):
1071 </p><div class="example">
1072 <pre class="example">$ ffmpeg -f openal -i '' out.ogg
1073 </pre></div>
1074
1075 <p>Capture from two devices simultaneously, writing to two different files,
1076 within the same <code>ffmpeg</code> command:
1077 </p><div class="example">
1078 <pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
1079 </pre></div>
1080 <p>Note: not all OpenAL implementations support multiple simultaneous capture -
1081 try the latest OpenAL Soft if the above does not work.
1082 </p>
1083 <a name="oss"></a>
1084 <h3 class="section">3.15 oss<span class="pull-right"><a class="anchor hidden-xs" href="#oss" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-oss" aria-hidden="true">TOC</a></span></h3>
1085
1086 <p>Open Sound System input device.
1087 </p>
1088 <p>The filename to provide to the input device is the device node
1089 representing the OSS input device, and is usually set to
1090 <samp>/dev/dsp</samp>.
1091 </p>
1092 <p>For example to grab from <samp>/dev/dsp</samp> using <code>ffmpeg</code> use the
1093 command:
1094 </p><div class="example">
1095 <pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
1096 </pre></div>
1097
1098 <p>For more information about OSS see:
1099 <a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
1100 </p>
1101 <a name="pulse"></a>
1102 <h3 class="section">3.16 pulse<span class="pull-right"><a class="anchor hidden-xs" href="#pulse" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pulse" aria-hidden="true">TOC</a></span></h3>
1103
1104 <p>PulseAudio input device.
1105 </p>
1106 <p>To enable this output device you need to configure FFmpeg with <code>--enable-libpulse</code>.
1107 </p>
1108 <p>The filename to provide to the input device is a source device or the
1109 string &quot;default&quot;
1110 </p>
1111 <p>To list the PulseAudio source devices and their properties you can invoke
1112 the command <code>pactl list sources</code>.
1113 </p>
1114 <p>More information about PulseAudio can be found on <a href="http://www.pulseaudio.org">http://www.pulseaudio.org</a>.
1115 </p>
1116 <a name="Options-8"></a>
1117 <h4 class="subsection">3.16.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-8" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-8" aria-hidden="true">TOC</a></span></h4>
1118 <dl compact="compact">
1119 <dt><samp>server</samp></dt>
1120 <dd><p>Connect to a specific PulseAudio server, specified by an IP address.
1121 Default server is used when not provided.
1122 </p>
1123 </dd>
1124 <dt><samp>name</samp></dt>
1125 <dd><p>Specify the application name PulseAudio will use when showing active clients,
1126 by default it is the <code>LIBAVFORMAT_IDENT</code> string.
1127 </p>
1128 </dd>
1129 <dt><samp>stream_name</samp></dt>
1130 <dd><p>Specify the stream name PulseAudio will use when showing active streams,
1131 by default it is &quot;record&quot;.
1132 </p>
1133 </dd>
1134 <dt><samp>sample_rate</samp></dt>
1135 <dd><p>Specify the samplerate in Hz, by default 48kHz is used.
1136 </p>
1137 </dd>
1138 <dt><samp>channels</samp></dt>
1139 <dd><p>Specify the channels in use, by default 2 (stereo) is set.
1140 </p>
1141 </dd>
1142 <dt><samp>frame_size</samp></dt>
1143 <dd><p>Specify the number of bytes per frame, by default it is set to 1024.
1144 </p>
1145 </dd>
1146 <dt><samp>fragment_size</samp></dt>
1147 <dd><p>Specify the minimal buffering fragment in PulseAudio, it will affect the
1148 audio latency. By default it is unset.
1149 </p></dd>
1150 </dl>
1151
1152 <a name="Examples-6"></a>
1153 <h4 class="subsection">3.16.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-6" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-6" aria-hidden="true">TOC</a></span></h4>
1154 <p>Record a stream from default device:
1155 </p><div class="example">
1156 <pre class="example">ffmpeg -f pulse -i default /tmp/pulse.wav
1157 </pre></div>
1158
1159 <a name="qtkit"></a>
1160 <h3 class="section">3.17 qtkit<span class="pull-right"><a class="anchor hidden-xs" href="#qtkit" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-qtkit" aria-hidden="true">TOC</a></span></h3>
1161
1162 <p>QTKit input device.
1163 </p>
1164 <p>The filename passed as input is parsed to contain either a device name or index.
1165 The device index can also be given by using -video_device_index.
1166 A given device index will override any given device name.
1167 If the desired device consists of numbers only, use -video_device_index to identify it.
1168 The default device will be chosen if an empty string  or the device name &quot;default&quot; is given.
1169 The available devices can be enumerated by using -list_devices.
1170 </p>
1171 <div class="example">
1172 <pre class="example">ffmpeg -f qtkit -i &quot;0&quot; out.mpg
1173 </pre></div>
1174
1175 <div class="example">
1176 <pre class="example">ffmpeg -f qtkit -video_device_index 0 -i &quot;&quot; out.mpg
1177 </pre></div>
1178
1179 <div class="example">
1180 <pre class="example">ffmpeg -f qtkit -i &quot;default&quot; out.mpg
1181 </pre></div>
1182
1183 <div class="example">
1184 <pre class="example">ffmpeg -f qtkit -list_devices true -i &quot;&quot;
1185 </pre></div>
1186
1187 <a name="sndio"></a>
1188 <h3 class="section">3.18 sndio<span class="pull-right"><a class="anchor hidden-xs" href="#sndio" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sndio" aria-hidden="true">TOC</a></span></h3>
1189
1190 <p>sndio input device.
1191 </p>
1192 <p>To enable this input device during configuration you need libsndio
1193 installed on your system.
1194 </p>
1195 <p>The filename to provide to the input device is the device node
1196 representing the sndio input device, and is usually set to
1197 <samp>/dev/audio0</samp>.
1198 </p>
1199 <p>For example to grab from <samp>/dev/audio0</samp> using <code>ffmpeg</code> use the
1200 command:
1201 </p><div class="example">
1202 <pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
1203 </pre></div>
1204
1205 <a name="video4linux2_002c-v4l2"></a>
1206 <h3 class="section">3.19 video4linux2, v4l2<span class="pull-right"><a class="anchor hidden-xs" href="#video4linux2_002c-v4l2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-video4linux2_002c-v4l2" aria-hidden="true">TOC</a></span></h3>
1207
1208 <p>Video4Linux2 input video device.
1209 </p>
1210 <p>&quot;v4l2&quot; can be used as alias for &quot;video4linux2&quot;.
1211 </p>
1212 <p>If FFmpeg is built with v4l-utils support (by using the
1213 <code>--enable-libv4l2</code> configure option), it is possible to use it with the
1214 <code>-use_libv4l2</code> input device option.
1215 </p>
1216 <p>The name of the device to grab is a file device node, usually Linux
1217 systems tend to automatically create such nodes when the device
1218 (e.g. an USB webcam) is plugged into the system, and has a name of the
1219 kind <samp>/dev/video<var>N</var></samp>, where <var>N</var> is a number associated to
1220 the device.
1221 </p>
1222 <p>Video4Linux2 devices usually support a limited set of
1223 <var>width</var>x<var>height</var> sizes and frame rates. You can check which are
1224 supported using <code>-list_formats all</code> for Video4Linux2 devices.
1225 Some devices, like TV cards, support one or more standards. It is possible
1226 to list all the supported standards using <code>-list_standards all</code>.
1227 </p>
1228 <p>The time base for the timestamps is 1 microsecond. Depending on the kernel
1229 version and configuration, the timestamps may be derived from the real time
1230 clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
1231 boot time, unaffected by NTP or manual changes to the clock). The
1232 <samp>-timestamps abs</samp> or <samp>-ts abs</samp> option can be used to force
1233 conversion into the real time clock.
1234 </p>
1235 <p>Some usage examples of the video4linux2 device with <code>ffmpeg</code>
1236 and <code>ffplay</code>:
1237 </p><ul>
1238 <li> List supported formats for a video4linux2 device:
1239 <div class="example">
1240 <pre class="example">ffplay -f video4linux2 -list_formats all /dev/video0
1241 </pre></div>
1242
1243 </li><li> Grab and show the input of a video4linux2 device:
1244 <div class="example">
1245 <pre class="example">ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
1246 </pre></div>
1247
1248 </li><li> Grab and record the input of a video4linux2 device, leave the
1249 frame rate and size as previously set:
1250 <div class="example">
1251 <pre class="example">ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
1252 </pre></div>
1253 </li></ul>
1254
1255 <p>For more information about Video4Linux, check <a href="http://linuxtv.org/">http://linuxtv.org/</a>.
1256 </p>
1257 <a name="Options-9"></a>
1258 <h4 class="subsection">3.19.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-9" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-9" aria-hidden="true">TOC</a></span></h4>
1259
1260 <dl compact="compact">
1261 <dt><samp>standard</samp></dt>
1262 <dd><p>Set the standard. Must be the name of a supported standard. To get a
1263 list of the supported standards, use the <samp>list_standards</samp>
1264 option.
1265 </p>
1266 </dd>
1267 <dt><samp>channel</samp></dt>
1268 <dd><p>Set the input channel number. Default to -1, which means using the
1269 previously selected channel.
1270 </p>
1271 </dd>
1272 <dt><samp>video_size</samp></dt>
1273 <dd><p>Set the video frame size. The argument must be a string in the form
1274 <var>WIDTH</var>x<var>HEIGHT</var> or a valid size abbreviation.
1275 </p>
1276 </dd>
1277 <dt><samp>pixel_format</samp></dt>
1278 <dd><p>Select the pixel format (only valid for raw video input).
1279 </p>
1280 </dd>
1281 <dt><samp>input_format</samp></dt>
1282 <dd><p>Set the preferred pixel format (for raw video) or a codec name.
1283 This option allows one to select the input format, when several are
1284 available.
1285 </p>
1286 </dd>
1287 <dt><samp>framerate</samp></dt>
1288 <dd><p>Set the preferred video frame rate.
1289 </p>
1290 </dd>
1291 <dt><samp>list_formats</samp></dt>
1292 <dd><p>List available formats (supported pixel formats, codecs, and frame
1293 sizes) and exit.
1294 </p>
1295 <p>Available values are:
1296 </p><dl compact="compact">
1297 <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
1298 <dd><p>Show all available (compressed and non-compressed) formats.
1299 </p>
1300 </dd>
1301 <dt>&lsquo;<samp>raw</samp>&rsquo;</dt>
1302 <dd><p>Show only raw video (non-compressed) formats.
1303 </p>
1304 </dd>
1305 <dt>&lsquo;<samp>compressed</samp>&rsquo;</dt>
1306 <dd><p>Show only compressed formats.
1307 </p></dd>
1308 </dl>
1309
1310 </dd>
1311 <dt><samp>list_standards</samp></dt>
1312 <dd><p>List supported standards and exit.
1313 </p>
1314 <p>Available values are:
1315 </p><dl compact="compact">
1316 <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
1317 <dd><p>Show all supported standards.
1318 </p></dd>
1319 </dl>
1320
1321 </dd>
1322 <dt><samp>timestamps, ts</samp></dt>
1323 <dd><p>Set type of timestamps for grabbed frames.
1324 </p>
1325 <p>Available values are:
1326 </p><dl compact="compact">
1327 <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
1328 <dd><p>Use timestamps from the kernel.
1329 </p>
1330 </dd>
1331 <dt>&lsquo;<samp>abs</samp>&rsquo;</dt>
1332 <dd><p>Use absolute timestamps (wall clock).
1333 </p>
1334 </dd>
1335 <dt>&lsquo;<samp>mono2abs</samp>&rsquo;</dt>
1336 <dd><p>Force conversion from monotonic to absolute timestamps.
1337 </p></dd>
1338 </dl>
1339
1340 <p>Default value is <code>default</code>.
1341 </p></dd>
1342 </dl>
1343
1344 <a name="vfwcap"></a>
1345 <h3 class="section">3.20 vfwcap<span class="pull-right"><a class="anchor hidden-xs" href="#vfwcap" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vfwcap" aria-hidden="true">TOC</a></span></h3>
1346
1347 <p>VfW (Video for Windows) capture input device.
1348 </p>
1349 <p>The filename passed as input is the capture driver number, ranging from
1350 0 to 9. You may use &quot;list&quot; as filename to print a list of drivers. Any
1351 other filename will be interpreted as device number 0.
1352 </p>
1353 <a name="x11grab"></a>
1354 <h3 class="section">3.21 x11grab<span class="pull-right"><a class="anchor hidden-xs" href="#x11grab" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-x11grab" aria-hidden="true">TOC</a></span></h3>
1355
1356 <p>X11 video input device.
1357 </p>
1358 <p>To enable this input device during configuration you need libxcb
1359 installed on your system. It will be automatically detected during
1360 configuration.
1361 </p>
1362 <p>Alternatively, the configure option <samp>--enable-x11grab</samp> exists
1363 for legacy Xlib users.
1364 </p>
1365 <p>This device allows one to capture a region of an X11 display.
1366 </p>
1367 <p>The filename passed as input has the syntax:
1368 </p><div class="example">
1369 <pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
1370 </pre></div>
1371
1372 <p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
1373 X11 display name of the screen to grab from. <var>hostname</var> can be
1374 omitted, and defaults to &quot;localhost&quot;. The environment variable
1375 <code>DISPLAY</code> contains the default display name.
1376 </p>
1377 <p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
1378 area with respect to the top-left border of the X11 screen. They
1379 default to 0.
1380 </p>
1381 <p>Check the X11 documentation (e.g. <code>man X</code>) for more detailed
1382 information.
1383 </p>
1384 <p>Use the <code>xdpyinfo</code> program for getting basic information about
1385 the properties of your X11 display (e.g. grep for &quot;name&quot; or
1386 &quot;dimensions&quot;).
1387 </p>
1388 <p>For example to grab from <samp>:0.0</samp> using <code>ffmpeg</code>:
1389 </p><div class="example">
1390 <pre class="example">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
1391 </pre></div>
1392
1393 <p>Grab at position <code>10,20</code>:
1394 </p><div class="example">
1395 <pre class="example">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
1396 </pre></div>
1397
1398 <a name="Options-10"></a>
1399 <h4 class="subsection">3.21.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-10" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-10" aria-hidden="true">TOC</a></span></h4>
1400
1401 <dl compact="compact">
1402 <dt><samp>draw_mouse</samp></dt>
1403 <dd><p>Specify whether to draw the mouse pointer. A value of <code>0</code> specify
1404 not to draw the pointer. Default value is <code>1</code>.
1405 </p>
1406 </dd>
1407 <dt><samp>follow_mouse</samp></dt>
1408 <dd><p>Make the grabbed area follow the mouse. The argument can be
1409 <code>centered</code> or a number of pixels <var>PIXELS</var>.
1410 </p>
1411 <p>When it is specified with &quot;centered&quot;, the grabbing region follows the mouse
1412 pointer and keeps the pointer at the center of region; otherwise, the region
1413 follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
1414 zero) to the edge of region.
1415 </p>
1416 <p>For example:
1417 </p><div class="example">
1418 <pre class="example">ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
1419 </pre></div>
1420
1421 <p>To follow only when the mouse pointer reaches within 100 pixels to edge:
1422 </p><div class="example">
1423 <pre class="example">ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
1424 </pre></div>
1425
1426 </dd>
1427 <dt><samp>framerate</samp></dt>
1428 <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
1429 corresponding to a frame rate of <code>30000/1001</code>.
1430 </p>
1431 </dd>
1432 <dt><samp>show_region</samp></dt>
1433 <dd><p>Show grabbed region on screen.
1434 </p>
1435 <p>If <var>show_region</var> is specified with <code>1</code>, then the grabbing
1436 region will be indicated on screen. With this option, it is easy to
1437 know what is being grabbed if only a portion of the screen is grabbed.
1438 </p>
1439 </dd>
1440 <dt><samp>region_border</samp></dt>
1441 <dd><p>Set the region border thickness if <samp>-show_region 1</samp> is used.
1442 Range is 1 to 128 and default is 3 (XCB-based x11grab only).
1443 </p>
1444 <p>For example:
1445 </p><div class="example">
1446 <pre class="example">ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
1447 </pre></div>
1448
1449 <p>With <var>follow_mouse</var>:
1450 </p><div class="example">
1451 <pre class="example">ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
1452 </pre></div>
1453
1454 </dd>
1455 <dt><samp>video_size</samp></dt>
1456 <dd><p>Set the video frame size. Default value is <code>vga</code>.
1457 </p>
1458 </dd>
1459 <dt><samp>use_shm</samp></dt>
1460 <dd><p>Use the MIT-SHM extension for shared memory. Default value is <code>1</code>.
1461 It may be necessary to disable it for remote displays (legacy x11grab
1462 only).
1463 </p></dd>
1464 </dl>
1465
1466 <a name="grab_005fx-grab_005fy-AVOption"></a>
1467 <h4 class="subsection">3.21.2 <var>grab_x</var> <var>grab_y</var> AVOption<span class="pull-right"><a class="anchor hidden-xs" href="#grab_005fx-grab_005fy-AVOption" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-grab_005fx-grab_005fy-AVOption" aria-hidden="true">TOC</a></span></h4>
1468
1469 <p>The syntax is:
1470 </p><div class="example">
1471 <pre class="example">-grab_x <var>x_offset</var> -grab_y <var>y_offset</var>
1472 </pre></div>
1473
1474 <p>Set the grabbing region coordinates. They are expressed as offset from the top left
1475 corner of the X11 window. The default value is 0.
1476 </p>
1477
1478 <a name="Output-Devices"></a>
1479 <h2 class="chapter">4 Output Devices<span class="pull-right"><a class="anchor hidden-xs" href="#Output-Devices" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Output-Devices" aria-hidden="true">TOC</a></span></h2>
1480
1481 <p>Output devices are configured elements in FFmpeg that can write
1482 multimedia data to an output device attached to your system.
1483 </p>
1484 <p>When you configure your FFmpeg build, all the supported output devices
1485 are enabled by default. You can list all available ones using the
1486 configure option &quot;&ndash;list-outdevs&quot;.
1487 </p>
1488 <p>You can disable all the output devices using the configure option
1489 &quot;&ndash;disable-outdevs&quot;, and selectively enable an output device using the
1490 option &quot;&ndash;enable-outdev=<var>OUTDEV</var>&quot;, or you can disable a particular
1491 input device using the option &quot;&ndash;disable-outdev=<var>OUTDEV</var>&quot;.
1492 </p>
1493 <p>The option &quot;-devices&quot; of the ff* tools will display the list of
1494 enabled output devices.
1495 </p>
1496 <p>A description of the currently available output devices follows.
1497 </p>
1498 <a name="alsa-1"></a>
1499 <h3 class="section">4.1 alsa<span class="pull-right"><a class="anchor hidden-xs" href="#alsa-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-alsa-1" aria-hidden="true">TOC</a></span></h3>
1500
1501 <p>ALSA (Advanced Linux Sound Architecture) output device.
1502 </p>
1503 <a name="Examples-7"></a>
1504 <h4 class="subsection">4.1.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-7" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-7" aria-hidden="true">TOC</a></span></h4>
1505
1506 <ul>
1507 <li> Play a file on default ALSA device:
1508 <div class="example">
1509 <pre class="example">ffmpeg -i INPUT -f alsa default
1510 </pre></div>
1511
1512 </li><li> Play a file on soundcard 1, audio device 7:
1513 <div class="example">
1514 <pre class="example">ffmpeg -i INPUT -f alsa hw:1,7
1515 </pre></div>
1516 </li></ul>
1517
1518 <a name="caca"></a>
1519 <h3 class="section">4.2 caca<span class="pull-right"><a class="anchor hidden-xs" href="#caca" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-caca" aria-hidden="true">TOC</a></span></h3>
1520
1521 <p>CACA output device.
1522 </p>
1523 <p>This output device allows one to show a video stream in CACA window.
1524 Only one CACA window is allowed per application, so you can
1525 have only one instance of this output device in an application.
1526 </p>
1527 <p>To enable this output device you need to configure FFmpeg with
1528 <code>--enable-libcaca</code>.
1529 libcaca is a graphics library that outputs text instead of pixels.
1530 </p>
1531 <p>For more information about libcaca, check:
1532 <a href="http://caca.zoy.org/wiki/libcaca">http://caca.zoy.org/wiki/libcaca</a>
1533 </p>
1534 <a name="Options-11"></a>
1535 <h4 class="subsection">4.2.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-11" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-11" aria-hidden="true">TOC</a></span></h4>
1536
1537 <dl compact="compact">
1538 <dt><samp>window_title</samp></dt>
1539 <dd><p>Set the CACA window title, if not specified default to the filename
1540 specified for the output device.
1541 </p>
1542 </dd>
1543 <dt><samp>window_size</samp></dt>
1544 <dd><p>Set the CACA window size, can be a string of the form
1545 <var>width</var>x<var>height</var> or a video size abbreviation.
1546 If not specified it defaults to the size of the input video.
1547 </p>
1548 </dd>
1549 <dt><samp>driver</samp></dt>
1550 <dd><p>Set display driver.
1551 </p>
1552 </dd>
1553 <dt><samp>algorithm</samp></dt>
1554 <dd><p>Set dithering algorithm. Dithering is necessary
1555 because the picture being rendered has usually far more colours than
1556 the available palette.
1557 The accepted values are listed with <code>-list_dither algorithms</code>.
1558 </p>
1559 </dd>
1560 <dt><samp>antialias</samp></dt>
1561 <dd><p>Set antialias method. Antialiasing smoothens the rendered
1562 image and avoids the commonly seen staircase effect.
1563 The accepted values are listed with <code>-list_dither antialiases</code>.
1564 </p>
1565 </dd>
1566 <dt><samp>charset</samp></dt>
1567 <dd><p>Set which characters are going to be used when rendering text.
1568 The accepted values are listed with <code>-list_dither charsets</code>.
1569 </p>
1570 </dd>
1571 <dt><samp>color</samp></dt>
1572 <dd><p>Set color to be used when rendering text.
1573 The accepted values are listed with <code>-list_dither colors</code>.
1574 </p>
1575 </dd>
1576 <dt><samp>list_drivers</samp></dt>
1577 <dd><p>If set to <samp>true</samp>, print a list of available drivers and exit.
1578 </p>
1579 </dd>
1580 <dt><samp>list_dither</samp></dt>
1581 <dd><p>List available dither options related to the argument.
1582 The argument must be one of <code>algorithms</code>, <code>antialiases</code>,
1583 <code>charsets</code>, <code>colors</code>.
1584 </p></dd>
1585 </dl>
1586
1587 <a name="Examples-8"></a>
1588 <h4 class="subsection">4.2.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-8" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-8" aria-hidden="true">TOC</a></span></h4>
1589
1590 <ul>
1591 <li> The following command shows the <code>ffmpeg</code> output is an
1592 CACA window, forcing its size to 80x25:
1593 <div class="example">
1594 <pre class="example">ffmpeg -i INPUT -vcodec rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -
1595 </pre></div>
1596
1597 </li><li> Show the list of available drivers and exit:
1598 <div class="example">
1599 <pre class="example">ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_drivers true -
1600 </pre></div>
1601
1602 </li><li> Show the list of available dither colors and exit:
1603 <div class="example">
1604 <pre class="example">ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors -
1605 </pre></div>
1606 </li></ul>
1607
1608 <a name="decklink-1"></a>
1609 <h3 class="section">4.3 decklink<span class="pull-right"><a class="anchor hidden-xs" href="#decklink-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-decklink-1" aria-hidden="true">TOC</a></span></h3>
1610
1611 <p>The decklink output device provides playback capabilities for Blackmagic
1612 DeckLink devices.
1613 </p>
1614 <p>To enable this output device, you need the Blackmagic DeckLink SDK and you
1615 need to configure with the appropriate <code>--extra-cflags</code>
1616 and <code>--extra-ldflags</code>.
1617 On Windows, you need to run the IDL files through <code>widl</code>.
1618 </p>
1619 <p>DeckLink is very picky about the formats it supports. Pixel format is always
1620 uyvy422, framerate and video size must be determined for your device with
1621 <code>-list_formats 1</code>. Audio sample rate is always 48 kHz.
1622 </p>
1623 <a name="Options-12"></a>
1624 <h4 class="subsection">4.3.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-12" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-12" aria-hidden="true">TOC</a></span></h4>
1625
1626 <dl compact="compact">
1627 <dt><samp>list_devices</samp></dt>
1628 <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
1629 Defaults to <samp>false</samp>.
1630 </p>
1631 </dd>
1632 <dt><samp>list_formats</samp></dt>
1633 <dd><p>If set to <samp>true</samp>, print a list of supported formats and exit.
1634 Defaults to <samp>false</samp>.
1635 </p>
1636 </dd>
1637 <dt><samp>preroll</samp></dt>
1638 <dd><p>Amount of time to preroll video in seconds.
1639 Defaults to <samp>0.5</samp>.
1640 </p>
1641 </dd>
1642 </dl>
1643
1644 <a name="Examples-9"></a>
1645 <h4 class="subsection">4.3.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-9" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-9" aria-hidden="true">TOC</a></span></h4>
1646
1647 <ul>
1648 <li> List output devices:
1649 <div class="example">
1650 <pre class="example">ffmpeg -i test.avi -f decklink -list_devices 1 dummy
1651 </pre></div>
1652
1653 </li><li> List supported formats:
1654 <div class="example">
1655 <pre class="example">ffmpeg -i test.avi -f decklink -list_formats 1 'DeckLink Mini Monitor'
1656 </pre></div>
1657
1658 </li><li> Play video clip:
1659 <div class="example">
1660 <pre class="example">ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 'DeckLink Mini Monitor'
1661 </pre></div>
1662
1663 </li><li> Play video clip with non-standard framerate or video size:
1664 <div class="example">
1665 <pre class="example">ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 -s 720x486 -r 24000/1001 'DeckLink Mini Monitor'
1666 </pre></div>
1667
1668 </li></ul>
1669
1670 <a name="fbdev-1"></a>
1671 <h3 class="section">4.4 fbdev<span class="pull-right"><a class="anchor hidden-xs" href="#fbdev-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fbdev-1" aria-hidden="true">TOC</a></span></h3>
1672
1673 <p>Linux framebuffer output device.
1674 </p>
1675 <p>The Linux framebuffer is a graphic hardware-independent abstraction
1676 layer to show graphics on a computer monitor, typically on the
1677 console. It is accessed through a file device node, usually
1678 <samp>/dev/fb0</samp>.
1679 </p>
1680 <p>For more detailed information read the file
1681 <samp>Documentation/fb/framebuffer.txt</samp> included in the Linux source tree.
1682 </p>
1683 <a name="Options-13"></a>
1684 <h4 class="subsection">4.4.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-13" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-13" aria-hidden="true">TOC</a></span></h4>
1685 <dl compact="compact">
1686 <dt><samp>xoffset</samp></dt>
1687 <dt><samp>yoffset</samp></dt>
1688 <dd><p>Set x/y coordinate of top left corner. Default is 0.
1689 </p></dd>
1690 </dl>
1691
1692 <a name="Examples-10"></a>
1693 <h4 class="subsection">4.4.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-10" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-10" aria-hidden="true">TOC</a></span></h4>
1694 <p>Play a file on framebuffer device <samp>/dev/fb0</samp>.
1695 Required pixel format depends on current framebuffer settings.
1696 </p><div class="example">
1697 <pre class="example">ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0
1698 </pre></div>
1699
1700 <p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
1701 </p>
1702 <a name="opengl"></a>
1703 <h3 class="section">4.5 opengl<span class="pull-right"><a class="anchor hidden-xs" href="#opengl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-opengl" aria-hidden="true">TOC</a></span></h3>
1704 <p>OpenGL output device.
1705 </p>
1706 <p>To enable this output device you need to configure FFmpeg with <code>--enable-opengl</code>.
1707 </p>
1708 <p>This output device allows one to render to OpenGL context.
1709 Context may be provided by application or default SDL window is created.
1710 </p>
1711 <p>When device renders to external context, application must implement handlers for following messages:
1712 <code>AV_DEV_TO_APP_CREATE_WINDOW_BUFFER</code> - create OpenGL context on current thread.
1713 <code>AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER</code> - make OpenGL context current.
1714 <code>AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER</code> - swap buffers.
1715 <code>AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER</code> - destroy OpenGL context.
1716 Application is also required to inform a device about current resolution by sending <code>AV_APP_TO_DEV_WINDOW_SIZE</code> message.
1717 </p>
1718 <a name="Options-14"></a>
1719 <h4 class="subsection">4.5.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-14" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-14" aria-hidden="true">TOC</a></span></h4>
1720 <dl compact="compact">
1721 <dt><samp>background</samp></dt>
1722 <dd><p>Set background color. Black is a default.
1723 </p></dd>
1724 <dt><samp>no_window</samp></dt>
1725 <dd><p>Disables default SDL window when set to non-zero value.
1726 Application must provide OpenGL context and both <code>window_size_cb</code> and <code>window_swap_buffers_cb</code> callbacks when set.
1727 </p></dd>
1728 <dt><samp>window_title</samp></dt>
1729 <dd><p>Set the SDL window title, if not specified default to the filename specified for the output device.
1730 Ignored when <samp>no_window</samp> is set.
1731 </p></dd>
1732 <dt><samp>window_size</samp></dt>
1733 <dd><p>Set preferred window size, can be a string of the form widthxheight or a video size abbreviation.
1734 If not specified it defaults to the size of the input video, downscaled according to the aspect ratio.
1735 Mostly usable when <samp>no_window</samp> is not set.
1736 </p>
1737 </dd>
1738 </dl>
1739
1740 <a name="Examples-11"></a>
1741 <h4 class="subsection">4.5.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-11" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-11" aria-hidden="true">TOC</a></span></h4>
1742 <p>Play a file on SDL window using OpenGL rendering:
1743 </p><div class="example">
1744 <pre class="example">ffmpeg  -i INPUT -f opengl &quot;window title&quot;
1745 </pre></div>
1746
1747 <a name="oss-1"></a>
1748 <h3 class="section">4.6 oss<span class="pull-right"><a class="anchor hidden-xs" href="#oss-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-oss-1" aria-hidden="true">TOC</a></span></h3>
1749
1750 <p>OSS (Open Sound System) output device.
1751 </p>
1752 <a name="pulse-1"></a>
1753 <h3 class="section">4.7 pulse<span class="pull-right"><a class="anchor hidden-xs" href="#pulse-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pulse-1" aria-hidden="true">TOC</a></span></h3>
1754
1755 <p>PulseAudio output device.
1756 </p>
1757 <p>To enable this output device you need to configure FFmpeg with <code>--enable-libpulse</code>.
1758 </p>
1759 <p>More information about PulseAudio can be found on <a href="http://www.pulseaudio.org">http://www.pulseaudio.org</a>
1760 </p>
1761 <a name="Options-15"></a>
1762 <h4 class="subsection">4.7.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-15" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-15" aria-hidden="true">TOC</a></span></h4>
1763 <dl compact="compact">
1764 <dt><samp>server</samp></dt>
1765 <dd><p>Connect to a specific PulseAudio server, specified by an IP address.
1766 Default server is used when not provided.
1767 </p>
1768 </dd>
1769 <dt><samp>name</samp></dt>
1770 <dd><p>Specify the application name PulseAudio will use when showing active clients,
1771 by default it is the <code>LIBAVFORMAT_IDENT</code> string.
1772 </p>
1773 </dd>
1774 <dt><samp>stream_name</samp></dt>
1775 <dd><p>Specify the stream name PulseAudio will use when showing active streams,
1776 by default it is set to the specified output name.
1777 </p>
1778 </dd>
1779 <dt><samp>device</samp></dt>
1780 <dd><p>Specify the device to use. Default device is used when not provided.
1781 List of output devices can be obtained with command <code>pactl list sinks</code>.
1782 </p>
1783 </dd>
1784 <dt><samp>buffer_size</samp></dt>
1785 <dt><samp>buffer_duration</samp></dt>
1786 <dd><p>Control the size and duration of the PulseAudio buffer. A small buffer
1787 gives more control, but requires more frequent updates.
1788 </p>
1789 <p><samp>buffer_size</samp> specifies size in bytes while
1790 <samp>buffer_duration</samp> specifies duration in milliseconds.
1791 </p>
1792 <p>When both options are provided then the highest value is used
1793 (duration is recalculated to bytes using stream parameters). If they
1794 are set to 0 (which is default), the device will use the default
1795 PulseAudio duration value. By default PulseAudio set buffer duration
1796 to around 2 seconds.
1797 </p>
1798 </dd>
1799 <dt><samp>prebuf</samp></dt>
1800 <dd><p>Specify pre-buffering size in bytes. The server does not start with
1801 playback before at least <samp>prebuf</samp> bytes are available in the
1802 buffer. By default this option is initialized to the same value as
1803 <samp>buffer_size</samp> or <samp>buffer_duration</samp> (whichever is bigger).
1804 </p>
1805 </dd>
1806 <dt><samp>minreq</samp></dt>
1807 <dd><p>Specify minimum request size in bytes. The server does not request less
1808 than <samp>minreq</samp> bytes from the client, instead waits until the buffer
1809 is free enough to request more bytes at once. It is recommended to not set
1810 this option, which will initialize this to a value that is deemed sensible
1811 by the server.
1812 </p>
1813 </dd>
1814 </dl>
1815
1816 <a name="Examples-12"></a>
1817 <h4 class="subsection">4.7.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-12" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-12" aria-hidden="true">TOC</a></span></h4>
1818 <p>Play a file on default device on default server:
1819 </p><div class="example">
1820 <pre class="example">ffmpeg  -i INPUT -f pulse &quot;stream name&quot;
1821 </pre></div>
1822
1823 <a name="sdl"></a>
1824 <h3 class="section">4.8 sdl<span class="pull-right"><a class="anchor hidden-xs" href="#sdl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sdl" aria-hidden="true">TOC</a></span></h3>
1825
1826 <p>SDL (Simple DirectMedia Layer) output device.
1827 </p>
1828 <p>This output device allows one to show a video stream in an SDL
1829 window. Only one SDL window is allowed per application, so you can
1830 have only one instance of this output device in an application.
1831 </p>
1832 <p>To enable this output device you need libsdl installed on your system
1833 when configuring your build.
1834 </p>
1835 <p>For more information about SDL, check:
1836 <a href="http://www.libsdl.org/">http://www.libsdl.org/</a>
1837 </p>
1838 <a name="Options-16"></a>
1839 <h4 class="subsection">4.8.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-16" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-16" aria-hidden="true">TOC</a></span></h4>
1840
1841 <dl compact="compact">
1842 <dt><samp>window_title</samp></dt>
1843 <dd><p>Set the SDL window title, if not specified default to the filename
1844 specified for the output device.
1845 </p>
1846 </dd>
1847 <dt><samp>icon_title</samp></dt>
1848 <dd><p>Set the name of the iconified SDL window, if not specified it is set
1849 to the same value of <var>window_title</var>.
1850 </p>
1851 </dd>
1852 <dt><samp>window_size</samp></dt>
1853 <dd><p>Set the SDL window size, can be a string of the form
1854 <var>width</var>x<var>height</var> or a video size abbreviation.
1855 If not specified it defaults to the size of the input video,
1856 downscaled according to the aspect ratio.
1857 </p>
1858 </dd>
1859 <dt><samp>window_fullscreen</samp></dt>
1860 <dd><p>Set fullscreen mode when non-zero value is provided.
1861 Default value is zero.
1862 </p></dd>
1863 </dl>
1864
1865 <a name="Interactive-commands"></a>
1866 <h4 class="subsection">4.8.2 Interactive commands<span class="pull-right"><a class="anchor hidden-xs" href="#Interactive-commands" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Interactive-commands" aria-hidden="true">TOC</a></span></h4>
1867
1868 <p>The window created by the device can be controlled through the
1869 following interactive commands.
1870 </p>
1871 <dl compact="compact">
1872 <dt><tt class="key">q, ESC</tt></dt>
1873 <dd><p>Quit the device immediately.
1874 </p></dd>
1875 </dl>
1876
1877 <a name="Examples-13"></a>
1878 <h4 class="subsection">4.8.3 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-13" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-13" aria-hidden="true">TOC</a></span></h4>
1879
1880 <p>The following command shows the <code>ffmpeg</code> output is an
1881 SDL window, forcing its size to the qcif format:
1882 </p><div class="example">
1883 <pre class="example">ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl &quot;SDL output&quot;
1884 </pre></div>
1885
1886 <a name="sndio-1"></a>
1887 <h3 class="section">4.9 sndio<span class="pull-right"><a class="anchor hidden-xs" href="#sndio-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sndio-1" aria-hidden="true">TOC</a></span></h3>
1888
1889 <p>sndio audio output device.
1890 </p>
1891 <a name="xv"></a>
1892 <h3 class="section">4.10 xv<span class="pull-right"><a class="anchor hidden-xs" href="#xv" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xv" aria-hidden="true">TOC</a></span></h3>
1893
1894 <p>XV (XVideo) output device.
1895 </p>
1896 <p>This output device allows one to show a video stream in a X Window System
1897 window.
1898 </p>
1899 <a name="Options-17"></a>
1900 <h4 class="subsection">4.10.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-17" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-17" aria-hidden="true">TOC</a></span></h4>
1901
1902 <dl compact="compact">
1903 <dt><samp>display_name</samp></dt>
1904 <dd><p>Specify the hardware display name, which determines the display and
1905 communications domain to be used.
1906 </p>
1907 <p>The display name or DISPLAY environment variable can be a string in
1908 the format <var>hostname</var>[:<var>number</var>[.<var>screen_number</var>]].
1909 </p>
1910 <p><var>hostname</var> specifies the name of the host machine on which the
1911 display is physically attached. <var>number</var> specifies the number of
1912 the display server on that host machine. <var>screen_number</var> specifies
1913 the screen to be used on that server.
1914 </p>
1915 <p>If unspecified, it defaults to the value of the DISPLAY environment
1916 variable.
1917 </p>
1918 <p>For example, <code>dual-headed:0.1</code> would specify screen 1 of display
1919 0 on the machine named &ldquo;dual-headed&rdquo;.
1920 </p>
1921 <p>Check the X11 specification for more detailed information about the
1922 display name format.
1923 </p>
1924 </dd>
1925 <dt><samp>window_id</samp></dt>
1926 <dd><p>When set to non-zero value then device doesn&rsquo;t create new window,
1927 but uses existing one with provided <var>window_id</var>. By default
1928 this options is set to zero and device creates its own window.
1929 </p>
1930 </dd>
1931 <dt><samp>window_size</samp></dt>
1932 <dd><p>Set the created window size, can be a string of the form
1933 <var>width</var>x<var>height</var> or a video size abbreviation. If not
1934 specified it defaults to the size of the input video.
1935 Ignored when <var>window_id</var> is set.
1936 </p>
1937 </dd>
1938 <dt><samp>window_x</samp></dt>
1939 <dt><samp>window_y</samp></dt>
1940 <dd><p>Set the X and Y window offsets for the created window. They are both
1941 set to 0 by default. The values may be ignored by the window manager.
1942 Ignored when <var>window_id</var> is set.
1943 </p>
1944 </dd>
1945 <dt><samp>window_title</samp></dt>
1946 <dd><p>Set the window title, if not specified default to the filename
1947 specified for the output device. Ignored when <var>window_id</var> is set.
1948 </p></dd>
1949 </dl>
1950
1951 <p>For more information about XVideo see <a href="http://www.x.org/">http://www.x.org/</a>.
1952 </p>
1953 <a name="Examples-14"></a>
1954 <h4 class="subsection">4.10.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-14" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-14" aria-hidden="true">TOC</a></span></h4>
1955
1956 <ul>
1957 <li> Decode, display and encode video input with <code>ffmpeg</code> at the
1958 same time:
1959 <div class="example">
1960 <pre class="example">ffmpeg -i INPUT OUTPUT -f xv display
1961 </pre></div>
1962
1963 </li><li> Decode and display the input video to multiple X11 windows:
1964 <div class="example">
1965 <pre class="example">ffmpeg -i INPUT -f xv normal -vf negate -f xv negated
1966 </pre></div>
1967 </li></ul>
1968
1969
1970 <a name="See-Also"></a>
1971 <h2 class="chapter">5 See Also<span class="pull-right"><a class="anchor hidden-xs" href="#See-Also" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-See-Also" aria-hidden="true">TOC</a></span></h2>
1972
1973 <p><a href="ffmpeg.html">ffmpeg</a>, <a href="ffplay.html">ffplay</a>, <a href="ffprobe.html">ffprobe</a>, <a href="ffserver.html">ffserver</a>,
1974 <a href="libavdevice.html">libavdevice</a>
1975 </p>
1976
1977 <a name="Authors"></a>
1978 <h2 class="chapter">6 Authors<span class="pull-right"><a class="anchor hidden-xs" href="#Authors" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Authors" aria-hidden="true">TOC</a></span></h2>
1979
1980 <p>The FFmpeg developers.
1981 </p>
1982 <p>For details about the authorship, see the Git history of the project
1983 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
1984 <code>git log</code> in the FFmpeg source directory, or browsing the
1985 online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
1986 </p>
1987 <p>Maintainers for the specific components are listed in the file
1988 <samp>MAINTAINERS</samp> in the source code tree.
1989 </p>
1990
1991
1992       <p style="font-size: small;">
1993         This document was generated using <a href="http://www.gnu.org/software/texinfo/"><em>makeinfo</em></a>.
1994       </p>
1995     </div>
1996   </body>
1997 </html>