yading@10
|
1 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
|
yading@10
|
2 .\"
|
yading@10
|
3 .\" Standard preamble:
|
yading@10
|
4 .\" ========================================================================
|
yading@10
|
5 .de Sp \" Vertical space (when we can't use .PP)
|
yading@10
|
6 .if t .sp .5v
|
yading@10
|
7 .if n .sp
|
yading@10
|
8 ..
|
yading@10
|
9 .de Vb \" Begin verbatim text
|
yading@10
|
10 .ft CW
|
yading@10
|
11 .nf
|
yading@10
|
12 .ne \\$1
|
yading@10
|
13 ..
|
yading@10
|
14 .de Ve \" End verbatim text
|
yading@10
|
15 .ft R
|
yading@10
|
16 .fi
|
yading@10
|
17 ..
|
yading@10
|
18 .\" Set up some character translations and predefined strings. \*(-- will
|
yading@10
|
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
yading@10
|
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
yading@10
|
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
yading@10
|
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
yading@10
|
23 .\" nothing in troff, for use with C<>.
|
yading@10
|
24 .tr \(*W-
|
yading@10
|
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
yading@10
|
26 .ie n \{\
|
yading@10
|
27 . ds -- \(*W-
|
yading@10
|
28 . ds PI pi
|
yading@10
|
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
yading@10
|
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
yading@10
|
31 . ds L" ""
|
yading@10
|
32 . ds R" ""
|
yading@10
|
33 . ds C` ""
|
yading@10
|
34 . ds C' ""
|
yading@10
|
35 'br\}
|
yading@10
|
36 .el\{\
|
yading@10
|
37 . ds -- \|\(em\|
|
yading@10
|
38 . ds PI \(*p
|
yading@10
|
39 . ds L" ``
|
yading@10
|
40 . ds R" ''
|
yading@10
|
41 'br\}
|
yading@10
|
42 .\"
|
yading@10
|
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
|
yading@10
|
44 .ie \n(.g .ds Aq \(aq
|
yading@10
|
45 .el .ds Aq '
|
yading@10
|
46 .\"
|
yading@10
|
47 .\" If the F register is turned on, we'll generate index entries on stderr for
|
yading@10
|
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
yading@10
|
49 .\" entries marked with X<> in POD. Of course, you'll have to process the
|
yading@10
|
50 .\" output yourself in some meaningful fashion.
|
yading@10
|
51 .ie \nF \{\
|
yading@10
|
52 . de IX
|
yading@10
|
53 . tm Index:\\$1\t\\n%\t"\\$2"
|
yading@10
|
54 ..
|
yading@10
|
55 . nr % 0
|
yading@10
|
56 . rr F
|
yading@10
|
57 .\}
|
yading@10
|
58 .el \{\
|
yading@10
|
59 . de IX
|
yading@10
|
60 ..
|
yading@10
|
61 .\}
|
yading@10
|
62 .\"
|
yading@10
|
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
yading@10
|
64 .\" Fear. Run. Save yourself. No user-serviceable parts.
|
yading@10
|
65 . \" fudge factors for nroff and troff
|
yading@10
|
66 .if n \{\
|
yading@10
|
67 . ds #H 0
|
yading@10
|
68 . ds #V .8m
|
yading@10
|
69 . ds #F .3m
|
yading@10
|
70 . ds #[ \f1
|
yading@10
|
71 . ds #] \fP
|
yading@10
|
72 .\}
|
yading@10
|
73 .if t \{\
|
yading@10
|
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
yading@10
|
75 . ds #V .6m
|
yading@10
|
76 . ds #F 0
|
yading@10
|
77 . ds #[ \&
|
yading@10
|
78 . ds #] \&
|
yading@10
|
79 .\}
|
yading@10
|
80 . \" simple accents for nroff and troff
|
yading@10
|
81 .if n \{\
|
yading@10
|
82 . ds ' \&
|
yading@10
|
83 . ds ` \&
|
yading@10
|
84 . ds ^ \&
|
yading@10
|
85 . ds , \&
|
yading@10
|
86 . ds ~ ~
|
yading@10
|
87 . ds /
|
yading@10
|
88 .\}
|
yading@10
|
89 .if t \{\
|
yading@10
|
90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
yading@10
|
91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
yading@10
|
92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
yading@10
|
93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
yading@10
|
94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
yading@10
|
95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
yading@10
|
96 .\}
|
yading@10
|
97 . \" troff and (daisy-wheel) nroff accents
|
yading@10
|
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
yading@10
|
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
yading@10
|
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
yading@10
|
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
yading@10
|
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
yading@10
|
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
yading@10
|
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
yading@10
|
105 .ds ae a\h'-(\w'a'u*4/10)'e
|
yading@10
|
106 .ds Ae A\h'-(\w'A'u*4/10)'E
|
yading@10
|
107 . \" corrections for vroff
|
yading@10
|
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
yading@10
|
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
yading@10
|
110 . \" for low resolution devices (crt and lpr)
|
yading@10
|
111 .if \n(.H>23 .if \n(.V>19 \
|
yading@10
|
112 \{\
|
yading@10
|
113 . ds : e
|
yading@10
|
114 . ds 8 ss
|
yading@10
|
115 . ds o a
|
yading@10
|
116 . ds d- d\h'-1'\(ga
|
yading@10
|
117 . ds D- D\h'-1'\(hy
|
yading@10
|
118 . ds th \o'bp'
|
yading@10
|
119 . ds Th \o'LP'
|
yading@10
|
120 . ds ae ae
|
yading@10
|
121 . ds Ae AE
|
yading@10
|
122 .\}
|
yading@10
|
123 .rm #[ #] #H #V #F C
|
yading@10
|
124 .\" ========================================================================
|
yading@10
|
125 .\"
|
yading@10
|
126 .IX Title "FFMPEG-DEVICES 1"
|
yading@10
|
127 .TH FFMPEG-DEVICES 1 "2013-04-21" " " " "
|
yading@10
|
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
yading@10
|
129 .\" way too many mistakes in technical documents.
|
yading@10
|
130 .if n .ad l
|
yading@10
|
131 .nh
|
yading@10
|
132 .SH "NAME"
|
yading@10
|
133 ffmpeg\-devices \- FFmpeg devices
|
yading@10
|
134 .SH "DESCRIPTION"
|
yading@10
|
135 .IX Header "DESCRIPTION"
|
yading@10
|
136 This document describes the input and output devices provided by the
|
yading@10
|
137 libavdevice library.
|
yading@10
|
138 .SH "DEVICE OPTIONS"
|
yading@10
|
139 .IX Header "DEVICE OPTIONS"
|
yading@10
|
140 The libavdevice library provides the same interface as
|
yading@10
|
141 libavformat. Namely, an input device is considered like a demuxer, and
|
yading@10
|
142 an output device like a muxer, and the interface and generic device
|
yading@10
|
143 options are the same provided by libavformat (see the ffmpeg-formats
|
yading@10
|
144 manual).
|
yading@10
|
145 .PP
|
yading@10
|
146 In addition each input or output device may support so-called private
|
yading@10
|
147 options, which are specific for that component.
|
yading@10
|
148 .PP
|
yading@10
|
149 Options may be set by specifying \-\fIoption\fR \fIvalue\fR in the
|
yading@10
|
150 FFmpeg tools, or by setting the value explicitly in the device
|
yading@10
|
151 \&\f(CW\*(C`AVFormatContext\*(C'\fR options or using the \fIlibavutil/opt.h\fR \s-1API\s0
|
yading@10
|
152 for programmatic use.
|
yading@10
|
153 .SH "INPUT DEVICES"
|
yading@10
|
154 .IX Header "INPUT DEVICES"
|
yading@10
|
155 Input devices are configured elements in FFmpeg which allow to access
|
yading@10
|
156 the data coming from a multimedia device attached to your system.
|
yading@10
|
157 .PP
|
yading@10
|
158 When you configure your FFmpeg build, all the supported input devices
|
yading@10
|
159 are enabled by default. You can list all available ones using the
|
yading@10
|
160 configure option \*(L"\-\-list\-indevs\*(R".
|
yading@10
|
161 .PP
|
yading@10
|
162 You can disable all the input devices using the configure option
|
yading@10
|
163 \&\*(L"\-\-disable\-indevs\*(R", and selectively enable an input device using the
|
yading@10
|
164 option "\-\-enable\-indev=\fI\s-1INDEV\s0\fR\*(L", or you can disable a particular
|
yading@10
|
165 input device using the option \*(R"\-\-disable\-indev=\fI\s-1INDEV\s0\fR".
|
yading@10
|
166 .PP
|
yading@10
|
167 The option \*(L"\-formats\*(R" of the ff* tools will display the list of
|
yading@10
|
168 supported input devices (amongst the demuxers).
|
yading@10
|
169 .PP
|
yading@10
|
170 A description of the currently available input devices follows.
|
yading@10
|
171 .SS "alsa"
|
yading@10
|
172 .IX Subsection "alsa"
|
yading@10
|
173 \&\s-1ALSA\s0 (Advanced Linux Sound Architecture) input device.
|
yading@10
|
174 .PP
|
yading@10
|
175 To enable this input device during configuration you need libasound
|
yading@10
|
176 installed on your system.
|
yading@10
|
177 .PP
|
yading@10
|
178 This device allows capturing from an \s-1ALSA\s0 device. The name of the
|
yading@10
|
179 device to capture has to be an \s-1ALSA\s0 card identifier.
|
yading@10
|
180 .PP
|
yading@10
|
181 An \s-1ALSA\s0 identifier has the syntax:
|
yading@10
|
182 .PP
|
yading@10
|
183 .Vb 1
|
yading@10
|
184 \& hw:<CARD>[,<DEV>[,<SUBDEV>]]
|
yading@10
|
185 .Ve
|
yading@10
|
186 .PP
|
yading@10
|
187 where the \fI\s-1DEV\s0\fR and \fI\s-1SUBDEV\s0\fR components are optional.
|
yading@10
|
188 .PP
|
yading@10
|
189 The three arguments (in order: \fI\s-1CARD\s0\fR,\fI\s-1DEV\s0\fR,\fI\s-1SUBDEV\s0\fR)
|
yading@10
|
190 specify card number or identifier, device number and subdevice number
|
yading@10
|
191 (\-1 means any).
|
yading@10
|
192 .PP
|
yading@10
|
193 To see the list of cards currently recognized by your system check the
|
yading@10
|
194 files \fI/proc/asound/cards\fR and \fI/proc/asound/devices\fR.
|
yading@10
|
195 .PP
|
yading@10
|
196 For example to capture with \fBffmpeg\fR from an \s-1ALSA\s0 device with
|
yading@10
|
197 card id 0, you may run the command:
|
yading@10
|
198 .PP
|
yading@10
|
199 .Vb 1
|
yading@10
|
200 \& ffmpeg \-f alsa \-i hw:0 alsaout.wav
|
yading@10
|
201 .Ve
|
yading@10
|
202 .PP
|
yading@10
|
203 For more information see:
|
yading@10
|
204 <\fBhttp://www.alsa\-project.org/alsa\-doc/alsa\-lib/pcm.html\fR>
|
yading@10
|
205 .SS "bktr"
|
yading@10
|
206 .IX Subsection "bktr"
|
yading@10
|
207 \&\s-1BSD\s0 video input device.
|
yading@10
|
208 .SS "dshow"
|
yading@10
|
209 .IX Subsection "dshow"
|
yading@10
|
210 Windows DirectShow input device.
|
yading@10
|
211 .PP
|
yading@10
|
212 DirectShow support is enabled when FFmpeg is built with the mingw\-w64 project.
|
yading@10
|
213 Currently only audio and video devices are supported.
|
yading@10
|
214 .PP
|
yading@10
|
215 Multiple devices may be opened as separate inputs, but they may also be
|
yading@10
|
216 opened on the same input, which should improve synchronism between them.
|
yading@10
|
217 .PP
|
yading@10
|
218 The input name should be in the format:
|
yading@10
|
219 .PP
|
yading@10
|
220 .Vb 1
|
yading@10
|
221 \& <TYPE>=<NAME>[:<TYPE>=<NAME>]
|
yading@10
|
222 .Ve
|
yading@10
|
223 .PP
|
yading@10
|
224 where \fI\s-1TYPE\s0\fR can be either \fIaudio\fR or \fIvideo\fR,
|
yading@10
|
225 and \fI\s-1NAME\s0\fR is the device's name.
|
yading@10
|
226 .PP
|
yading@10
|
227 \fIOptions\fR
|
yading@10
|
228 .IX Subsection "Options"
|
yading@10
|
229 .PP
|
yading@10
|
230 If no options are specified, the device's defaults are used.
|
yading@10
|
231 If the device does not support the requested options, it will
|
yading@10
|
232 fail to open.
|
yading@10
|
233 .IP "\fBvideo_size\fR" 4
|
yading@10
|
234 .IX Item "video_size"
|
yading@10
|
235 Set the video size in the captured video.
|
yading@10
|
236 .IP "\fBframerate\fR" 4
|
yading@10
|
237 .IX Item "framerate"
|
yading@10
|
238 Set the frame rate in the captured video.
|
yading@10
|
239 .IP "\fBsample_rate\fR" 4
|
yading@10
|
240 .IX Item "sample_rate"
|
yading@10
|
241 Set the sample rate (in Hz) of the captured audio.
|
yading@10
|
242 .IP "\fBsample_size\fR" 4
|
yading@10
|
243 .IX Item "sample_size"
|
yading@10
|
244 Set the sample size (in bits) of the captured audio.
|
yading@10
|
245 .IP "\fBchannels\fR" 4
|
yading@10
|
246 .IX Item "channels"
|
yading@10
|
247 Set the number of channels in the captured audio.
|
yading@10
|
248 .IP "\fBlist_devices\fR" 4
|
yading@10
|
249 .IX Item "list_devices"
|
yading@10
|
250 If set to \fBtrue\fR, print a list of devices and exit.
|
yading@10
|
251 .IP "\fBlist_options\fR" 4
|
yading@10
|
252 .IX Item "list_options"
|
yading@10
|
253 If set to \fBtrue\fR, print a list of selected device's options
|
yading@10
|
254 and exit.
|
yading@10
|
255 .IP "\fBvideo_device_number\fR" 4
|
yading@10
|
256 .IX Item "video_device_number"
|
yading@10
|
257 Set video device number for devices with same name (starts at 0,
|
yading@10
|
258 defaults to 0).
|
yading@10
|
259 .IP "\fBaudio_device_number\fR" 4
|
yading@10
|
260 .IX Item "audio_device_number"
|
yading@10
|
261 Set audio device number for devices with same name (starts at 0,
|
yading@10
|
262 defaults to 0).
|
yading@10
|
263 .IP "\fBpixel_format\fR" 4
|
yading@10
|
264 .IX Item "pixel_format"
|
yading@10
|
265 Select pixel format to be used by DirectShow. This may only be set when
|
yading@10
|
266 the video codec is not set or set to rawvideo.
|
yading@10
|
267 .IP "\fBaudio_buffer_size\fR" 4
|
yading@10
|
268 .IX Item "audio_buffer_size"
|
yading@10
|
269 Set audio device buffer size in milliseconds (which can directly
|
yading@10
|
270 impact latency, depending on the device).
|
yading@10
|
271 Defaults to using the audio device's
|
yading@10
|
272 default buffer size (typically some multiple of 500ms).
|
yading@10
|
273 Setting this value too low can degrade performance.
|
yading@10
|
274 See also
|
yading@10
|
275 <\fBhttp://msdn.microsoft.com/en\-us/library/windows/desktop/dd377582(v=vs.85).aspx\fR>
|
yading@10
|
276 .PP
|
yading@10
|
277 \fIExamples\fR
|
yading@10
|
278 .IX Subsection "Examples"
|
yading@10
|
279 .IP "\(bu" 4
|
yading@10
|
280 Print the list of DirectShow supported devices and exit:
|
yading@10
|
281 .Sp
|
yading@10
|
282 .Vb 1
|
yading@10
|
283 \& $ ffmpeg \-list_devices true \-f dshow \-i dummy
|
yading@10
|
284 .Ve
|
yading@10
|
285 .IP "\(bu" 4
|
yading@10
|
286 Open video device \fICamera\fR:
|
yading@10
|
287 .Sp
|
yading@10
|
288 .Vb 1
|
yading@10
|
289 \& $ ffmpeg \-f dshow \-i video="Camera"
|
yading@10
|
290 .Ve
|
yading@10
|
291 .IP "\(bu" 4
|
yading@10
|
292 Open second video device with name \fICamera\fR:
|
yading@10
|
293 .Sp
|
yading@10
|
294 .Vb 1
|
yading@10
|
295 \& $ ffmpeg \-f dshow \-video_device_number 1 \-i video="Camera"
|
yading@10
|
296 .Ve
|
yading@10
|
297 .IP "\(bu" 4
|
yading@10
|
298 Open video device \fICamera\fR and audio device \fIMicrophone\fR:
|
yading@10
|
299 .Sp
|
yading@10
|
300 .Vb 1
|
yading@10
|
301 \& $ ffmpeg \-f dshow \-i video="Camera":audio="Microphone"
|
yading@10
|
302 .Ve
|
yading@10
|
303 .IP "\(bu" 4
|
yading@10
|
304 Print the list of supported options in selected device and exit:
|
yading@10
|
305 .Sp
|
yading@10
|
306 .Vb 1
|
yading@10
|
307 \& $ ffmpeg \-list_options true \-f dshow \-i video="Camera"
|
yading@10
|
308 .Ve
|
yading@10
|
309 .SS "dv1394"
|
yading@10
|
310 .IX Subsection "dv1394"
|
yading@10
|
311 Linux \s-1DV\s0 1394 input device.
|
yading@10
|
312 .SS "fbdev"
|
yading@10
|
313 .IX Subsection "fbdev"
|
yading@10
|
314 Linux framebuffer input device.
|
yading@10
|
315 .PP
|
yading@10
|
316 The Linux framebuffer is a graphic hardware-independent abstraction
|
yading@10
|
317 layer to show graphics on a computer monitor, typically on the
|
yading@10
|
318 console. It is accessed through a file device node, usually
|
yading@10
|
319 \&\fI/dev/fb0\fR.
|
yading@10
|
320 .PP
|
yading@10
|
321 For more detailed information read the file
|
yading@10
|
322 Documentation/fb/framebuffer.txt included in the Linux source tree.
|
yading@10
|
323 .PP
|
yading@10
|
324 To record from the framebuffer device \fI/dev/fb0\fR with
|
yading@10
|
325 \&\fBffmpeg\fR:
|
yading@10
|
326 .PP
|
yading@10
|
327 .Vb 1
|
yading@10
|
328 \& ffmpeg \-f fbdev \-r 10 \-i /dev/fb0 out.avi
|
yading@10
|
329 .Ve
|
yading@10
|
330 .PP
|
yading@10
|
331 You can take a single screenshot image with the command:
|
yading@10
|
332 .PP
|
yading@10
|
333 .Vb 1
|
yading@10
|
334 \& ffmpeg \-f fbdev \-frames:v 1 \-r 1 \-i /dev/fb0 screenshot.jpeg
|
yading@10
|
335 .Ve
|
yading@10
|
336 .PP
|
yading@10
|
337 See also <\fBhttp://linux\-fbdev.sourceforge.net/\fR>, and \fIfbset\fR\|(1).
|
yading@10
|
338 .SS "iec61883"
|
yading@10
|
339 .IX Subsection "iec61883"
|
yading@10
|
340 FireWire \s-1DV/HDV\s0 input device using libiec61883.
|
yading@10
|
341 .PP
|
yading@10
|
342 To enable this input device, you need libiec61883, libraw1394 and
|
yading@10
|
343 libavc1394 installed on your system. Use the configure option
|
yading@10
|
344 \&\f(CW\*(C`\-\-enable\-libiec61883\*(C'\fR to compile with the device enabled.
|
yading@10
|
345 .PP
|
yading@10
|
346 The iec61883 capture device supports capturing from a video device
|
yading@10
|
347 connected via \s-1IEEE1394\s0 (FireWire), using libiec61883 and the new Linux
|
yading@10
|
348 FireWire stack (juju). This is the default \s-1DV/HDV\s0 input method in Linux
|
yading@10
|
349 Kernel 2.6.37 and later, since the old FireWire stack was removed.
|
yading@10
|
350 .PP
|
yading@10
|
351 Specify the FireWire port to be used as input file, or \*(L"auto\*(R"
|
yading@10
|
352 to choose the first port connected.
|
yading@10
|
353 .PP
|
yading@10
|
354 \fIOptions\fR
|
yading@10
|
355 .IX Subsection "Options"
|
yading@10
|
356 .IP "\fBdvtype\fR" 4
|
yading@10
|
357 .IX Item "dvtype"
|
yading@10
|
358 Override autodetection of \s-1DV/HDV\s0. This should only be used if auto
|
yading@10
|
359 detection does not work, or if usage of a different device type
|
yading@10
|
360 should be prohibited. Treating a \s-1DV\s0 device as \s-1HDV\s0 (or vice versa) will
|
yading@10
|
361 not work and result in undefined behavior.
|
yading@10
|
362 The values \fBauto\fR, \fBdv\fR and \fBhdv\fR are supported.
|
yading@10
|
363 .IP "\fBdvbuffer\fR" 4
|
yading@10
|
364 .IX Item "dvbuffer"
|
yading@10
|
365 Set maxiumum size of buffer for incoming data, in frames. For \s-1DV\s0, this
|
yading@10
|
366 is an exact value. For \s-1HDV\s0, it is not frame exact, since \s-1HDV\s0 does
|
yading@10
|
367 not have a fixed frame size.
|
yading@10
|
368 .IP "\fBdvguid\fR" 4
|
yading@10
|
369 .IX Item "dvguid"
|
yading@10
|
370 Select the capture device by specifying it's \s-1GUID\s0. Capturing will only
|
yading@10
|
371 be performed from the specified device and fails if no device with the
|
yading@10
|
372 given \s-1GUID\s0 is found. This is useful to select the input if multiple
|
yading@10
|
373 devices are connected at the same time.
|
yading@10
|
374 Look at /sys/bus/firewire/devices to find out the GUIDs.
|
yading@10
|
375 .PP
|
yading@10
|
376 \fIExamples\fR
|
yading@10
|
377 .IX Subsection "Examples"
|
yading@10
|
378 .IP "\(bu" 4
|
yading@10
|
379 Grab and show the input of a FireWire \s-1DV/HDV\s0 device.
|
yading@10
|
380 .Sp
|
yading@10
|
381 .Vb 1
|
yading@10
|
382 \& ffplay \-f iec61883 \-i auto
|
yading@10
|
383 .Ve
|
yading@10
|
384 .IP "\(bu" 4
|
yading@10
|
385 Grab and record the input of a FireWire \s-1DV/HDV\s0 device,
|
yading@10
|
386 using a packet buffer of 100000 packets if the source is \s-1HDV\s0.
|
yading@10
|
387 .Sp
|
yading@10
|
388 .Vb 1
|
yading@10
|
389 \& ffmpeg \-f iec61883 \-i auto \-hdvbuffer 100000 out.mpg
|
yading@10
|
390 .Ve
|
yading@10
|
391 .SS "jack"
|
yading@10
|
392 .IX Subsection "jack"
|
yading@10
|
393 \&\s-1JACK\s0 input device.
|
yading@10
|
394 .PP
|
yading@10
|
395 To enable this input device during configuration you need libjack
|
yading@10
|
396 installed on your system.
|
yading@10
|
397 .PP
|
yading@10
|
398 A \s-1JACK\s0 input device creates one or more \s-1JACK\s0 writable clients, one for
|
yading@10
|
399 each audio channel, with name \fIclient_name\fR:input_\fIN\fR, where
|
yading@10
|
400 \&\fIclient_name\fR is the name provided by the application, and \fIN\fR
|
yading@10
|
401 is a number which identifies the channel.
|
yading@10
|
402 Each writable client will send the acquired data to the FFmpeg input
|
yading@10
|
403 device.
|
yading@10
|
404 .PP
|
yading@10
|
405 Once you have created one or more \s-1JACK\s0 readable clients, you need to
|
yading@10
|
406 connect them to one or more \s-1JACK\s0 writable clients.
|
yading@10
|
407 .PP
|
yading@10
|
408 To connect or disconnect \s-1JACK\s0 clients you can use the \fBjack_connect\fR
|
yading@10
|
409 and \fBjack_disconnect\fR programs, or do it through a graphical interface,
|
yading@10
|
410 for example with \fBqjackctl\fR.
|
yading@10
|
411 .PP
|
yading@10
|
412 To list the \s-1JACK\s0 clients and their properties you can invoke the command
|
yading@10
|
413 \&\fBjack_lsp\fR.
|
yading@10
|
414 .PP
|
yading@10
|
415 Follows an example which shows how to capture a \s-1JACK\s0 readable client
|
yading@10
|
416 with \fBffmpeg\fR.
|
yading@10
|
417 .PP
|
yading@10
|
418 .Vb 2
|
yading@10
|
419 \& # Create a JACK writable client with name "ffmpeg".
|
yading@10
|
420 \& $ ffmpeg \-f jack \-i ffmpeg \-y out.wav
|
yading@10
|
421 \&
|
yading@10
|
422 \& # Start the sample jack_metro readable client.
|
yading@10
|
423 \& $ jack_metro \-b 120 \-d 0.2 \-f 4000
|
yading@10
|
424 \&
|
yading@10
|
425 \& # List the current JACK clients.
|
yading@10
|
426 \& $ jack_lsp \-c
|
yading@10
|
427 \& system:capture_1
|
yading@10
|
428 \& system:capture_2
|
yading@10
|
429 \& system:playback_1
|
yading@10
|
430 \& system:playback_2
|
yading@10
|
431 \& ffmpeg:input_1
|
yading@10
|
432 \& metro:120_bpm
|
yading@10
|
433 \&
|
yading@10
|
434 \& # Connect metro to the ffmpeg writable client.
|
yading@10
|
435 \& $ jack_connect metro:120_bpm ffmpeg:input_1
|
yading@10
|
436 .Ve
|
yading@10
|
437 .PP
|
yading@10
|
438 For more information read:
|
yading@10
|
439 <\fBhttp://jackaudio.org/\fR>
|
yading@10
|
440 .SS "lavfi"
|
yading@10
|
441 .IX Subsection "lavfi"
|
yading@10
|
442 Libavfilter input virtual device.
|
yading@10
|
443 .PP
|
yading@10
|
444 This input device reads data from the open output pads of a libavfilter
|
yading@10
|
445 filtergraph.
|
yading@10
|
446 .PP
|
yading@10
|
447 For each filtergraph open output, the input device will create a
|
yading@10
|
448 corresponding stream which is mapped to the generated output. Currently
|
yading@10
|
449 only video data is supported. The filtergraph is specified through the
|
yading@10
|
450 option \fBgraph\fR.
|
yading@10
|
451 .PP
|
yading@10
|
452 \fIOptions\fR
|
yading@10
|
453 .IX Subsection "Options"
|
yading@10
|
454 .IP "\fBgraph\fR" 4
|
yading@10
|
455 .IX Item "graph"
|
yading@10
|
456 Specify the filtergraph to use as input. Each video open output must be
|
yading@10
|
457 labelled by a unique string of the form "out\fIN\fR", where \fIN\fR is a
|
yading@10
|
458 number starting from 0 corresponding to the mapped input stream
|
yading@10
|
459 generated by the device.
|
yading@10
|
460 The first unlabelled output is automatically assigned to the \*(L"out0\*(R"
|
yading@10
|
461 label, but all the others need to be specified explicitly.
|
yading@10
|
462 .Sp
|
yading@10
|
463 If not specified defaults to the filename specified for the input
|
yading@10
|
464 device.
|
yading@10
|
465 .IP "\fBgraph_file\fR" 4
|
yading@10
|
466 .IX Item "graph_file"
|
yading@10
|
467 Set the filename of the filtergraph to be read and sent to the other
|
yading@10
|
468 filters. Syntax of the filtergraph is the same as the one specified by
|
yading@10
|
469 the option \fIgraph\fR.
|
yading@10
|
470 .PP
|
yading@10
|
471 \fIExamples\fR
|
yading@10
|
472 .IX Subsection "Examples"
|
yading@10
|
473 .IP "\(bu" 4
|
yading@10
|
474 Create a color video stream and play it back with \fBffplay\fR:
|
yading@10
|
475 .Sp
|
yading@10
|
476 .Vb 1
|
yading@10
|
477 \& ffplay \-f lavfi \-graph "color=c=pink [out0]" dummy
|
yading@10
|
478 .Ve
|
yading@10
|
479 .IP "\(bu" 4
|
yading@10
|
480 As the previous example, but use filename for specifying the graph
|
yading@10
|
481 description, and omit the \*(L"out0\*(R" label:
|
yading@10
|
482 .Sp
|
yading@10
|
483 .Vb 1
|
yading@10
|
484 \& ffplay \-f lavfi color=c=pink
|
yading@10
|
485 .Ve
|
yading@10
|
486 .IP "\(bu" 4
|
yading@10
|
487 Create three different video test filtered sources and play them:
|
yading@10
|
488 .Sp
|
yading@10
|
489 .Vb 1
|
yading@10
|
490 \& ffplay \-f lavfi \-graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
|
yading@10
|
491 .Ve
|
yading@10
|
492 .IP "\(bu" 4
|
yading@10
|
493 Read an audio stream from a file using the amovie source and play it
|
yading@10
|
494 back with \fBffplay\fR:
|
yading@10
|
495 .Sp
|
yading@10
|
496 .Vb 1
|
yading@10
|
497 \& ffplay \-f lavfi "amovie=test.wav"
|
yading@10
|
498 .Ve
|
yading@10
|
499 .IP "\(bu" 4
|
yading@10
|
500 Read an audio stream and a video stream and play it back with
|
yading@10
|
501 \&\fBffplay\fR:
|
yading@10
|
502 .Sp
|
yading@10
|
503 .Vb 1
|
yading@10
|
504 \& ffplay \-f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
|
yading@10
|
505 .Ve
|
yading@10
|
506 .SS "libdc1394"
|
yading@10
|
507 .IX Subsection "libdc1394"
|
yading@10
|
508 \&\s-1IIDC1394\s0 input device, based on libdc1394 and libraw1394.
|
yading@10
|
509 .SS "openal"
|
yading@10
|
510 .IX Subsection "openal"
|
yading@10
|
511 The OpenAL input device provides audio capture on all systems with a
|
yading@10
|
512 working OpenAL 1.1 implementation.
|
yading@10
|
513 .PP
|
yading@10
|
514 To enable this input device during configuration, you need OpenAL
|
yading@10
|
515 headers and libraries installed on your system, and need to configure
|
yading@10
|
516 FFmpeg with \f(CW\*(C`\-\-enable\-openal\*(C'\fR.
|
yading@10
|
517 .PP
|
yading@10
|
518 OpenAL headers and libraries should be provided as part of your OpenAL
|
yading@10
|
519 implementation, or as an additional download (an \s-1SDK\s0). Depending on your
|
yading@10
|
520 installation you may need to specify additional flags via the
|
yading@10
|
521 \&\f(CW\*(C`\-\-extra\-cflags\*(C'\fR and \f(CW\*(C`\-\-extra\-ldflags\*(C'\fR for allowing the build
|
yading@10
|
522 system to locate the OpenAL headers and libraries.
|
yading@10
|
523 .PP
|
yading@10
|
524 An incomplete list of OpenAL implementations follows:
|
yading@10
|
525 .IP "\fBCreative\fR" 4
|
yading@10
|
526 .IX Item "Creative"
|
yading@10
|
527 The official Windows implementation, providing hardware acceleration
|
yading@10
|
528 with supported devices and software fallback.
|
yading@10
|
529 See <\fBhttp://openal.org/\fR>.
|
yading@10
|
530 .IP "\fBOpenAL Soft\fR" 4
|
yading@10
|
531 .IX Item "OpenAL Soft"
|
yading@10
|
532 Portable, open source (\s-1LGPL\s0) software implementation. Includes
|
yading@10
|
533 backends for the most common sound APIs on the Windows, Linux,
|
yading@10
|
534 Solaris, and \s-1BSD\s0 operating systems.
|
yading@10
|
535 See <\fBhttp://kcat.strangesoft.net/openal.html\fR>.
|
yading@10
|
536 .IP "\fBApple\fR" 4
|
yading@10
|
537 .IX Item "Apple"
|
yading@10
|
538 OpenAL is part of Core Audio, the official Mac \s-1OS\s0 X Audio interface.
|
yading@10
|
539 See <\fBhttp://developer.apple.com/technologies/mac/audio\-and\-video.html\fR>
|
yading@10
|
540 .PP
|
yading@10
|
541 This device allows to capture from an audio input device handled
|
yading@10
|
542 through OpenAL.
|
yading@10
|
543 .PP
|
yading@10
|
544 You need to specify the name of the device to capture in the provided
|
yading@10
|
545 filename. If the empty string is provided, the device will
|
yading@10
|
546 automatically select the default device. You can get the list of the
|
yading@10
|
547 supported devices by using the option \fIlist_devices\fR.
|
yading@10
|
548 .PP
|
yading@10
|
549 \fIOptions\fR
|
yading@10
|
550 .IX Subsection "Options"
|
yading@10
|
551 .IP "\fBchannels\fR" 4
|
yading@10
|
552 .IX Item "channels"
|
yading@10
|
553 Set the number of channels in the captured audio. Only the values
|
yading@10
|
554 \&\fB1\fR (monaural) and \fB2\fR (stereo) are currently supported.
|
yading@10
|
555 Defaults to \fB2\fR.
|
yading@10
|
556 .IP "\fBsample_size\fR" 4
|
yading@10
|
557 .IX Item "sample_size"
|
yading@10
|
558 Set the sample size (in bits) of the captured audio. Only the values
|
yading@10
|
559 \&\fB8\fR and \fB16\fR are currently supported. Defaults to
|
yading@10
|
560 \&\fB16\fR.
|
yading@10
|
561 .IP "\fBsample_rate\fR" 4
|
yading@10
|
562 .IX Item "sample_rate"
|
yading@10
|
563 Set the sample rate (in Hz) of the captured audio.
|
yading@10
|
564 Defaults to \fB44.1k\fR.
|
yading@10
|
565 .IP "\fBlist_devices\fR" 4
|
yading@10
|
566 .IX Item "list_devices"
|
yading@10
|
567 If set to \fBtrue\fR, print a list of devices and exit.
|
yading@10
|
568 Defaults to \fBfalse\fR.
|
yading@10
|
569 .PP
|
yading@10
|
570 \fIExamples\fR
|
yading@10
|
571 .IX Subsection "Examples"
|
yading@10
|
572 .PP
|
yading@10
|
573 Print the list of OpenAL supported devices and exit:
|
yading@10
|
574 .PP
|
yading@10
|
575 .Vb 1
|
yading@10
|
576 \& $ ffmpeg \-list_devices true \-f openal \-i dummy out.ogg
|
yading@10
|
577 .Ve
|
yading@10
|
578 .PP
|
yading@10
|
579 Capture from the OpenAL device \fI\s-1DR\-BT101\s0 via PulseAudio\fR:
|
yading@10
|
580 .PP
|
yading@10
|
581 .Vb 1
|
yading@10
|
582 \& $ ffmpeg \-f openal \-i \*(AqDR\-BT101 via PulseAudio\*(Aq out.ogg
|
yading@10
|
583 .Ve
|
yading@10
|
584 .PP
|
yading@10
|
585 Capture from the default device (note the empty string '' as filename):
|
yading@10
|
586 .PP
|
yading@10
|
587 .Vb 1
|
yading@10
|
588 \& $ ffmpeg \-f openal \-i \*(Aq\*(Aq out.ogg
|
yading@10
|
589 .Ve
|
yading@10
|
590 .PP
|
yading@10
|
591 Capture from two devices simultaneously, writing to two different files,
|
yading@10
|
592 within the same \fBffmpeg\fR command:
|
yading@10
|
593 .PP
|
yading@10
|
594 .Vb 1
|
yading@10
|
595 \& $ ffmpeg \-f openal \-i \*(AqDR\-BT101 via PulseAudio\*(Aq out1.ogg \-f openal \-i \*(AqALSA Default\*(Aq out2.ogg
|
yading@10
|
596 .Ve
|
yading@10
|
597 .PP
|
yading@10
|
598 Note: not all OpenAL implementations support multiple simultaneous capture \-
|
yading@10
|
599 try the latest OpenAL Soft if the above does not work.
|
yading@10
|
600 .SS "oss"
|
yading@10
|
601 .IX Subsection "oss"
|
yading@10
|
602 Open Sound System input device.
|
yading@10
|
603 .PP
|
yading@10
|
604 The filename to provide to the input device is the device node
|
yading@10
|
605 representing the \s-1OSS\s0 input device, and is usually set to
|
yading@10
|
606 \&\fI/dev/dsp\fR.
|
yading@10
|
607 .PP
|
yading@10
|
608 For example to grab from \fI/dev/dsp\fR using \fBffmpeg\fR use the
|
yading@10
|
609 command:
|
yading@10
|
610 .PP
|
yading@10
|
611 .Vb 1
|
yading@10
|
612 \& ffmpeg \-f oss \-i /dev/dsp /tmp/oss.wav
|
yading@10
|
613 .Ve
|
yading@10
|
614 .PP
|
yading@10
|
615 For more information about \s-1OSS\s0 see:
|
yading@10
|
616 <\fBhttp://manuals.opensound.com/usersguide/dsp.html\fR>
|
yading@10
|
617 .SS "pulse"
|
yading@10
|
618 .IX Subsection "pulse"
|
yading@10
|
619 pulseaudio input device.
|
yading@10
|
620 .PP
|
yading@10
|
621 To enable this input device during configuration you need libpulse-simple
|
yading@10
|
622 installed in your system.
|
yading@10
|
623 .PP
|
yading@10
|
624 The filename to provide to the input device is a source device or the
|
yading@10
|
625 string \*(L"default\*(R"
|
yading@10
|
626 .PP
|
yading@10
|
627 To list the pulse source devices and their properties you can invoke
|
yading@10
|
628 the command \fBpactl list sources\fR.
|
yading@10
|
629 .PP
|
yading@10
|
630 .Vb 1
|
yading@10
|
631 \& ffmpeg \-f pulse \-i default /tmp/pulse.wav
|
yading@10
|
632 .Ve
|
yading@10
|
633 .PP
|
yading@10
|
634 \fI\fIserver\fI AVOption\fR
|
yading@10
|
635 .IX Subsection "server AVOption"
|
yading@10
|
636 .PP
|
yading@10
|
637 The syntax is:
|
yading@10
|
638 .PP
|
yading@10
|
639 .Vb 1
|
yading@10
|
640 \& \-server <server name>
|
yading@10
|
641 .Ve
|
yading@10
|
642 .PP
|
yading@10
|
643 Connects to a specific server.
|
yading@10
|
644 .PP
|
yading@10
|
645 \fI\fIname\fI AVOption\fR
|
yading@10
|
646 .IX Subsection "name AVOption"
|
yading@10
|
647 .PP
|
yading@10
|
648 The syntax is:
|
yading@10
|
649 .PP
|
yading@10
|
650 .Vb 1
|
yading@10
|
651 \& \-name <application name>
|
yading@10
|
652 .Ve
|
yading@10
|
653 .PP
|
yading@10
|
654 Specify the application name pulse will use when showing active clients,
|
yading@10
|
655 by default it is the \s-1LIBAVFORMAT_IDENT\s0 string
|
yading@10
|
656 .PP
|
yading@10
|
657 \fI\fIstream_name\fI AVOption\fR
|
yading@10
|
658 .IX Subsection "stream_name AVOption"
|
yading@10
|
659 .PP
|
yading@10
|
660 The syntax is:
|
yading@10
|
661 .PP
|
yading@10
|
662 .Vb 1
|
yading@10
|
663 \& \-stream_name <stream name>
|
yading@10
|
664 .Ve
|
yading@10
|
665 .PP
|
yading@10
|
666 Specify the stream name pulse will use when showing active streams,
|
yading@10
|
667 by default it is \*(L"record\*(R"
|
yading@10
|
668 .PP
|
yading@10
|
669 \fI\fIsample_rate\fI AVOption\fR
|
yading@10
|
670 .IX Subsection "sample_rate AVOption"
|
yading@10
|
671 .PP
|
yading@10
|
672 The syntax is:
|
yading@10
|
673 .PP
|
yading@10
|
674 .Vb 1
|
yading@10
|
675 \& \-sample_rate <samplerate>
|
yading@10
|
676 .Ve
|
yading@10
|
677 .PP
|
yading@10
|
678 Specify the samplerate in Hz, by default 48kHz is used.
|
yading@10
|
679 .PP
|
yading@10
|
680 \fI\fIchannels\fI AVOption\fR
|
yading@10
|
681 .IX Subsection "channels AVOption"
|
yading@10
|
682 .PP
|
yading@10
|
683 The syntax is:
|
yading@10
|
684 .PP
|
yading@10
|
685 .Vb 1
|
yading@10
|
686 \& \-channels <N>
|
yading@10
|
687 .Ve
|
yading@10
|
688 .PP
|
yading@10
|
689 Specify the channels in use, by default 2 (stereo) is set.
|
yading@10
|
690 .PP
|
yading@10
|
691 \fI\fIframe_size\fI AVOption\fR
|
yading@10
|
692 .IX Subsection "frame_size AVOption"
|
yading@10
|
693 .PP
|
yading@10
|
694 The syntax is:
|
yading@10
|
695 .PP
|
yading@10
|
696 .Vb 1
|
yading@10
|
697 \& \-frame_size <bytes>
|
yading@10
|
698 .Ve
|
yading@10
|
699 .PP
|
yading@10
|
700 Specify the number of byte per frame, by default it is set to 1024.
|
yading@10
|
701 .PP
|
yading@10
|
702 \fI\fIfragment_size\fI AVOption\fR
|
yading@10
|
703 .IX Subsection "fragment_size AVOption"
|
yading@10
|
704 .PP
|
yading@10
|
705 The syntax is:
|
yading@10
|
706 .PP
|
yading@10
|
707 .Vb 1
|
yading@10
|
708 \& \-fragment_size <bytes>
|
yading@10
|
709 .Ve
|
yading@10
|
710 .PP
|
yading@10
|
711 Specify the minimal buffering fragment in pulseaudio, it will affect the
|
yading@10
|
712 audio latency. By default it is unset.
|
yading@10
|
713 .SS "sndio"
|
yading@10
|
714 .IX Subsection "sndio"
|
yading@10
|
715 sndio input device.
|
yading@10
|
716 .PP
|
yading@10
|
717 To enable this input device during configuration you need libsndio
|
yading@10
|
718 installed on your system.
|
yading@10
|
719 .PP
|
yading@10
|
720 The filename to provide to the input device is the device node
|
yading@10
|
721 representing the sndio input device, and is usually set to
|
yading@10
|
722 \&\fI/dev/audio0\fR.
|
yading@10
|
723 .PP
|
yading@10
|
724 For example to grab from \fI/dev/audio0\fR using \fBffmpeg\fR use the
|
yading@10
|
725 command:
|
yading@10
|
726 .PP
|
yading@10
|
727 .Vb 1
|
yading@10
|
728 \& ffmpeg \-f sndio \-i /dev/audio0 /tmp/oss.wav
|
yading@10
|
729 .Ve
|
yading@10
|
730 .SS "video4linux2, v4l2"
|
yading@10
|
731 .IX Subsection "video4linux2, v4l2"
|
yading@10
|
732 Video4Linux2 input video device.
|
yading@10
|
733 .PP
|
yading@10
|
734 \&\*(L"v4l2\*(R" can be used as alias for \*(L"video4linux2\*(R".
|
yading@10
|
735 .PP
|
yading@10
|
736 If FFmpeg is built with v4l\-utils support (by using the
|
yading@10
|
737 \&\f(CW\*(C`\-\-enable\-libv4l2\*(C'\fR configure option), the device will always rely
|
yading@10
|
738 on libv4l2.
|
yading@10
|
739 .PP
|
yading@10
|
740 The name of the device to grab is a file device node, usually Linux
|
yading@10
|
741 systems tend to automatically create such nodes when the device
|
yading@10
|
742 (e.g. an \s-1USB\s0 webcam) is plugged into the system, and has a name of the
|
yading@10
|
743 kind \fI/dev/video\fIN\fI\fR, where \fIN\fR is a number associated to
|
yading@10
|
744 the device.
|
yading@10
|
745 .PP
|
yading@10
|
746 Video4Linux2 devices usually support a limited set of
|
yading@10
|
747 \&\fIwidth\fRx\fIheight\fR sizes and frame rates. You can check which are
|
yading@10
|
748 supported using \fB\-list_formats all\fR for Video4Linux2 devices.
|
yading@10
|
749 Some devices, like \s-1TV\s0 cards, support one or more standards. It is possible
|
yading@10
|
750 to list all the supported standards using \fB\-list_standards all\fR.
|
yading@10
|
751 .PP
|
yading@10
|
752 The time base for the timestamps is 1 microsecond. Depending on the kernel
|
yading@10
|
753 version and configuration, the timestamps may be derived from the real time
|
yading@10
|
754 clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
|
yading@10
|
755 boot time, unaffected by \s-1NTP\s0 or manual changes to the clock). The
|
yading@10
|
756 \&\fB\-timestamps abs\fR or \fB\-ts abs\fR option can be used to force
|
yading@10
|
757 conversion into the real time clock.
|
yading@10
|
758 .PP
|
yading@10
|
759 Some usage examples of the video4linux2 device with \fBffmpeg\fR
|
yading@10
|
760 and \fBffplay\fR:
|
yading@10
|
761 .IP "\(bu" 4
|
yading@10
|
762 Grab and show the input of a video4linux2 device:
|
yading@10
|
763 .Sp
|
yading@10
|
764 .Vb 1
|
yading@10
|
765 \& ffplay \-f video4linux2 \-framerate 30 \-video_size hd720 /dev/video0
|
yading@10
|
766 .Ve
|
yading@10
|
767 .IP "\(bu" 4
|
yading@10
|
768 Grab and record the input of a video4linux2 device, leave the
|
yading@10
|
769 frame rate and size as previously set:
|
yading@10
|
770 .Sp
|
yading@10
|
771 .Vb 1
|
yading@10
|
772 \& ffmpeg \-f video4linux2 \-input_format mjpeg \-i /dev/video0 out.mpeg
|
yading@10
|
773 .Ve
|
yading@10
|
774 .PP
|
yading@10
|
775 For more information about Video4Linux, check <\fBhttp://linuxtv.org/\fR>.
|
yading@10
|
776 .PP
|
yading@10
|
777 \fIOptions\fR
|
yading@10
|
778 .IX Subsection "Options"
|
yading@10
|
779 .IP "\fBstandard\fR" 4
|
yading@10
|
780 .IX Item "standard"
|
yading@10
|
781 Set the standard. Must be the name of a supported standard. To get a
|
yading@10
|
782 list of the supported standards, use the \fBlist_standards\fR
|
yading@10
|
783 option.
|
yading@10
|
784 .IP "\fBchannel\fR" 4
|
yading@10
|
785 .IX Item "channel"
|
yading@10
|
786 Set the input channel number. Default to \-1, which means using the
|
yading@10
|
787 previously selected channel.
|
yading@10
|
788 .IP "\fBvideo_size\fR" 4
|
yading@10
|
789 .IX Item "video_size"
|
yading@10
|
790 Set the video frame size. The argument must be a string in the form
|
yading@10
|
791 \&\fI\s-1WIDTH\s0\fRx\fI\s-1HEIGHT\s0\fR or a valid size abbreviation.
|
yading@10
|
792 .IP "\fBpixel_format\fR" 4
|
yading@10
|
793 .IX Item "pixel_format"
|
yading@10
|
794 Select the pixel format (only valid for raw video input).
|
yading@10
|
795 .IP "\fBinput_format\fR" 4
|
yading@10
|
796 .IX Item "input_format"
|
yading@10
|
797 Set the preferred pixel format (for raw video) or a codec name.
|
yading@10
|
798 This option allows to select the input format, when several are
|
yading@10
|
799 available.
|
yading@10
|
800 .IP "\fBframerate\fR" 4
|
yading@10
|
801 .IX Item "framerate"
|
yading@10
|
802 Set the preferred video frame rate.
|
yading@10
|
803 .IP "\fBlist_formats\fR" 4
|
yading@10
|
804 .IX Item "list_formats"
|
yading@10
|
805 List available formats (supported pixel formats, codecs, and frame
|
yading@10
|
806 sizes) and exit.
|
yading@10
|
807 .Sp
|
yading@10
|
808 Available values are:
|
yading@10
|
809 .RS 4
|
yading@10
|
810 .IP "\fBall\fR" 4
|
yading@10
|
811 .IX Item "all"
|
yading@10
|
812 Show all available (compressed and non-compressed) formats.
|
yading@10
|
813 .IP "\fBraw\fR" 4
|
yading@10
|
814 .IX Item "raw"
|
yading@10
|
815 Show only raw video (non-compressed) formats.
|
yading@10
|
816 .IP "\fBcompressed\fR" 4
|
yading@10
|
817 .IX Item "compressed"
|
yading@10
|
818 Show only compressed formats.
|
yading@10
|
819 .RE
|
yading@10
|
820 .RS 4
|
yading@10
|
821 .RE
|
yading@10
|
822 .IP "\fBlist_standards\fR" 4
|
yading@10
|
823 .IX Item "list_standards"
|
yading@10
|
824 List supported standards and exit.
|
yading@10
|
825 .Sp
|
yading@10
|
826 Available values are:
|
yading@10
|
827 .RS 4
|
yading@10
|
828 .IP "\fBall\fR" 4
|
yading@10
|
829 .IX Item "all"
|
yading@10
|
830 Show all supported standards.
|
yading@10
|
831 .RE
|
yading@10
|
832 .RS 4
|
yading@10
|
833 .RE
|
yading@10
|
834 .IP "\fBtimestamps, ts\fR" 4
|
yading@10
|
835 .IX Item "timestamps, ts"
|
yading@10
|
836 Set type of timestamps for grabbed frames.
|
yading@10
|
837 .Sp
|
yading@10
|
838 Available values are:
|
yading@10
|
839 .RS 4
|
yading@10
|
840 .IP "\fBdefault\fR" 4
|
yading@10
|
841 .IX Item "default"
|
yading@10
|
842 Use timestamps from the kernel.
|
yading@10
|
843 .IP "\fBabs\fR" 4
|
yading@10
|
844 .IX Item "abs"
|
yading@10
|
845 Use absolute timestamps (wall clock).
|
yading@10
|
846 .IP "\fBmono2abs\fR" 4
|
yading@10
|
847 .IX Item "mono2abs"
|
yading@10
|
848 Force conversion from monotonic to absolute timestamps.
|
yading@10
|
849 .RE
|
yading@10
|
850 .RS 4
|
yading@10
|
851 .Sp
|
yading@10
|
852 Default value is \f(CW\*(C`default\*(C'\fR.
|
yading@10
|
853 .RE
|
yading@10
|
854 .SS "vfwcap"
|
yading@10
|
855 .IX Subsection "vfwcap"
|
yading@10
|
856 VfW (Video for Windows) capture input device.
|
yading@10
|
857 .PP
|
yading@10
|
858 The filename passed as input is the capture driver number, ranging from
|
yading@10
|
859 0 to 9. You may use \*(L"list\*(R" as filename to print a list of drivers. Any
|
yading@10
|
860 other filename will be interpreted as device number 0.
|
yading@10
|
861 .SS "x11grab"
|
yading@10
|
862 .IX Subsection "x11grab"
|
yading@10
|
863 X11 video input device.
|
yading@10
|
864 .PP
|
yading@10
|
865 This device allows to capture a region of an X11 display.
|
yading@10
|
866 .PP
|
yading@10
|
867 The filename passed as input has the syntax:
|
yading@10
|
868 .PP
|
yading@10
|
869 .Vb 1
|
yading@10
|
870 \& [<hostname>]:<display_number>.<screen_number>[+<x_offset>,<y_offset>]
|
yading@10
|
871 .Ve
|
yading@10
|
872 .PP
|
yading@10
|
873 \&\fIhostname\fR:\fIdisplay_number\fR.\fIscreen_number\fR specifies the
|
yading@10
|
874 X11 display name of the screen to grab from. \fIhostname\fR can be
|
yading@10
|
875 omitted, and defaults to \*(L"localhost\*(R". The environment variable
|
yading@10
|
876 \&\fB\s-1DISPLAY\s0\fR contains the default display name.
|
yading@10
|
877 .PP
|
yading@10
|
878 \&\fIx_offset\fR and \fIy_offset\fR specify the offsets of the grabbed
|
yading@10
|
879 area with respect to the top-left border of the X11 screen. They
|
yading@10
|
880 default to 0.
|
yading@10
|
881 .PP
|
yading@10
|
882 Check the X11 documentation (e.g. man X) for more detailed information.
|
yading@10
|
883 .PP
|
yading@10
|
884 Use the \fBdpyinfo\fR program for getting basic information about the
|
yading@10
|
885 properties of your X11 display (e.g. grep for \*(L"name\*(R" or \*(L"dimensions\*(R").
|
yading@10
|
886 .PP
|
yading@10
|
887 For example to grab from \fI:0.0\fR using \fBffmpeg\fR:
|
yading@10
|
888 .PP
|
yading@10
|
889 .Vb 1
|
yading@10
|
890 \& ffmpeg \-f x11grab \-r 25 \-s cif \-i :0.0 out.mpg
|
yading@10
|
891 .Ve
|
yading@10
|
892 .PP
|
yading@10
|
893 Grab at position \f(CW\*(C`10,20\*(C'\fR:
|
yading@10
|
894 .PP
|
yading@10
|
895 .Vb 1
|
yading@10
|
896 \& ffmpeg \-f x11grab \-r 25 \-s cif \-i :0.0+10,20 out.mpg
|
yading@10
|
897 .Ve
|
yading@10
|
898 .PP
|
yading@10
|
899 \fIOptions\fR
|
yading@10
|
900 .IX Subsection "Options"
|
yading@10
|
901 .IP "\fBdraw_mouse\fR" 4
|
yading@10
|
902 .IX Item "draw_mouse"
|
yading@10
|
903 Specify whether to draw the mouse pointer. A value of \f(CW0\fR specify
|
yading@10
|
904 not to draw the pointer. Default value is \f(CW1\fR.
|
yading@10
|
905 .IP "\fBfollow_mouse\fR" 4
|
yading@10
|
906 .IX Item "follow_mouse"
|
yading@10
|
907 Make the grabbed area follow the mouse. The argument can be
|
yading@10
|
908 \&\f(CW\*(C`centered\*(C'\fR or a number of pixels \fI\s-1PIXELS\s0\fR.
|
yading@10
|
909 .Sp
|
yading@10
|
910 When it is specified with \*(L"centered\*(R", the grabbing region follows the mouse
|
yading@10
|
911 pointer and keeps the pointer at the center of region; otherwise, the region
|
yading@10
|
912 follows only when the mouse pointer reaches within \fI\s-1PIXELS\s0\fR (greater than
|
yading@10
|
913 zero) to the edge of region.
|
yading@10
|
914 .Sp
|
yading@10
|
915 For example:
|
yading@10
|
916 .Sp
|
yading@10
|
917 .Vb 1
|
yading@10
|
918 \& ffmpeg \-f x11grab \-follow_mouse centered \-r 25 \-s cif \-i :0.0 out.mpg
|
yading@10
|
919 .Ve
|
yading@10
|
920 .Sp
|
yading@10
|
921 To follow only when the mouse pointer reaches within 100 pixels to edge:
|
yading@10
|
922 .Sp
|
yading@10
|
923 .Vb 1
|
yading@10
|
924 \& ffmpeg \-f x11grab \-follow_mouse 100 \-r 25 \-s cif \-i :0.0 out.mpg
|
yading@10
|
925 .Ve
|
yading@10
|
926 .IP "\fBframerate\fR" 4
|
yading@10
|
927 .IX Item "framerate"
|
yading@10
|
928 Set the grabbing frame rate. Default value is \f(CW\*(C`ntsc\*(C'\fR,
|
yading@10
|
929 corresponding to a frame rate of \f(CW\*(C`30000/1001\*(C'\fR.
|
yading@10
|
930 .IP "\fBshow_region\fR" 4
|
yading@10
|
931 .IX Item "show_region"
|
yading@10
|
932 Show grabbed region on screen.
|
yading@10
|
933 .Sp
|
yading@10
|
934 If \fIshow_region\fR is specified with \f(CW1\fR, then the grabbing
|
yading@10
|
935 region will be indicated on screen. With this option, it is easy to
|
yading@10
|
936 know what is being grabbed if only a portion of the screen is grabbed.
|
yading@10
|
937 .Sp
|
yading@10
|
938 For example:
|
yading@10
|
939 .Sp
|
yading@10
|
940 .Vb 1
|
yading@10
|
941 \& ffmpeg \-f x11grab \-show_region 1 \-r 25 \-s cif \-i :0.0+10,20 out.mpg
|
yading@10
|
942 .Ve
|
yading@10
|
943 .Sp
|
yading@10
|
944 With \fIfollow_mouse\fR:
|
yading@10
|
945 .Sp
|
yading@10
|
946 .Vb 1
|
yading@10
|
947 \& ffmpeg \-f x11grab \-follow_mouse centered \-show_region 1 \-r 25 \-s cif \-i :0.0 out.mpg
|
yading@10
|
948 .Ve
|
yading@10
|
949 .IP "\fBvideo_size\fR" 4
|
yading@10
|
950 .IX Item "video_size"
|
yading@10
|
951 Set the video frame size. Default value is \f(CW\*(C`vga\*(C'\fR.
|
yading@10
|
952 .SH "OUTPUT DEVICES"
|
yading@10
|
953 .IX Header "OUTPUT DEVICES"
|
yading@10
|
954 Output devices are configured elements in FFmpeg which allow to write
|
yading@10
|
955 multimedia data to an output device attached to your system.
|
yading@10
|
956 .PP
|
yading@10
|
957 When you configure your FFmpeg build, all the supported output devices
|
yading@10
|
958 are enabled by default. You can list all available ones using the
|
yading@10
|
959 configure option \*(L"\-\-list\-outdevs\*(R".
|
yading@10
|
960 .PP
|
yading@10
|
961 You can disable all the output devices using the configure option
|
yading@10
|
962 \&\*(L"\-\-disable\-outdevs\*(R", and selectively enable an output device using the
|
yading@10
|
963 option "\-\-enable\-outdev=\fI\s-1OUTDEV\s0\fR\*(L", or you can disable a particular
|
yading@10
|
964 input device using the option \*(R"\-\-disable\-outdev=\fI\s-1OUTDEV\s0\fR".
|
yading@10
|
965 .PP
|
yading@10
|
966 The option \*(L"\-formats\*(R" of the ff* tools will display the list of
|
yading@10
|
967 enabled output devices (amongst the muxers).
|
yading@10
|
968 .PP
|
yading@10
|
969 A description of the currently available output devices follows.
|
yading@10
|
970 .SS "alsa"
|
yading@10
|
971 .IX Subsection "alsa"
|
yading@10
|
972 \&\s-1ALSA\s0 (Advanced Linux Sound Architecture) output device.
|
yading@10
|
973 .SS "caca"
|
yading@10
|
974 .IX Subsection "caca"
|
yading@10
|
975 \&\s-1CACA\s0 output device.
|
yading@10
|
976 .PP
|
yading@10
|
977 This output devices allows to show a video stream in \s-1CACA\s0 window.
|
yading@10
|
978 Only one \s-1CACA\s0 window is allowed per application, so you can
|
yading@10
|
979 have only one instance of this output device in an application.
|
yading@10
|
980 .PP
|
yading@10
|
981 To enable this output device you need to configure FFmpeg with
|
yading@10
|
982 \&\f(CW\*(C`\-\-enable\-libcaca\*(C'\fR.
|
yading@10
|
983 libcaca is a graphics library that outputs text instead of pixels.
|
yading@10
|
984 .PP
|
yading@10
|
985 For more information about libcaca, check:
|
yading@10
|
986 <\fBhttp://caca.zoy.org/wiki/libcaca\fR>
|
yading@10
|
987 .PP
|
yading@10
|
988 \fIOptions\fR
|
yading@10
|
989 .IX Subsection "Options"
|
yading@10
|
990 .IP "\fBwindow_title\fR" 4
|
yading@10
|
991 .IX Item "window_title"
|
yading@10
|
992 Set the \s-1CACA\s0 window title, if not specified default to the filename
|
yading@10
|
993 specified for the output device.
|
yading@10
|
994 .IP "\fBwindow_size\fR" 4
|
yading@10
|
995 .IX Item "window_size"
|
yading@10
|
996 Set the \s-1CACA\s0 window size, can be a string of the form
|
yading@10
|
997 \&\fIwidth\fRx\fIheight\fR or a video size abbreviation.
|
yading@10
|
998 If not specified it defaults to the size of the input video.
|
yading@10
|
999 .IP "\fBdriver\fR" 4
|
yading@10
|
1000 .IX Item "driver"
|
yading@10
|
1001 Set display driver.
|
yading@10
|
1002 .IP "\fBalgorithm\fR" 4
|
yading@10
|
1003 .IX Item "algorithm"
|
yading@10
|
1004 Set dithering algorithm. Dithering is necessary
|
yading@10
|
1005 because the picture being rendered has usually far more colours than
|
yading@10
|
1006 the available palette.
|
yading@10
|
1007 The accepted values are listed with \f(CW\*(C`\-list_dither algorithms\*(C'\fR.
|
yading@10
|
1008 .IP "\fBantialias\fR" 4
|
yading@10
|
1009 .IX Item "antialias"
|
yading@10
|
1010 Set antialias method. Antialiasing smoothens the rendered
|
yading@10
|
1011 image and avoids the commonly seen staircase effect.
|
yading@10
|
1012 The accepted values are listed with \f(CW\*(C`\-list_dither antialiases\*(C'\fR.
|
yading@10
|
1013 .IP "\fBcharset\fR" 4
|
yading@10
|
1014 .IX Item "charset"
|
yading@10
|
1015 Set which characters are going to be used when rendering text.
|
yading@10
|
1016 The accepted values are listed with \f(CW\*(C`\-list_dither charsets\*(C'\fR.
|
yading@10
|
1017 .IP "\fBcolor\fR" 4
|
yading@10
|
1018 .IX Item "color"
|
yading@10
|
1019 Set color to be used when rendering text.
|
yading@10
|
1020 The accepted values are listed with \f(CW\*(C`\-list_dither colors\*(C'\fR.
|
yading@10
|
1021 .IP "\fBlist_drivers\fR" 4
|
yading@10
|
1022 .IX Item "list_drivers"
|
yading@10
|
1023 If set to \fBtrue\fR, print a list of available drivers and exit.
|
yading@10
|
1024 .IP "\fBlist_dither\fR" 4
|
yading@10
|
1025 .IX Item "list_dither"
|
yading@10
|
1026 List available dither options related to the argument.
|
yading@10
|
1027 The argument must be one of \f(CW\*(C`algorithms\*(C'\fR, \f(CW\*(C`antialiases\*(C'\fR,
|
yading@10
|
1028 \&\f(CW\*(C`charsets\*(C'\fR, \f(CW\*(C`colors\*(C'\fR.
|
yading@10
|
1029 .PP
|
yading@10
|
1030 \fIExamples\fR
|
yading@10
|
1031 .IX Subsection "Examples"
|
yading@10
|
1032 .IP "\(bu" 4
|
yading@10
|
1033 The following command shows the \fBffmpeg\fR output is an
|
yading@10
|
1034 \&\s-1CACA\s0 window, forcing its size to 80x25:
|
yading@10
|
1035 .Sp
|
yading@10
|
1036 .Vb 1
|
yading@10
|
1037 \& ffmpeg \-i INPUT \-vcodec rawvideo \-pix_fmt rgb24 \-window_size 80x25 \-f caca \-
|
yading@10
|
1038 .Ve
|
yading@10
|
1039 .IP "\(bu" 4
|
yading@10
|
1040 Show the list of available drivers and exit:
|
yading@10
|
1041 .Sp
|
yading@10
|
1042 .Vb 1
|
yading@10
|
1043 \& ffmpeg \-i INPUT \-pix_fmt rgb24 \-f caca \-list_drivers true \-
|
yading@10
|
1044 .Ve
|
yading@10
|
1045 .IP "\(bu" 4
|
yading@10
|
1046 Show the list of available dither colors and exit:
|
yading@10
|
1047 .Sp
|
yading@10
|
1048 .Vb 1
|
yading@10
|
1049 \& ffmpeg \-i INPUT \-pix_fmt rgb24 \-f caca \-list_dither colors \-
|
yading@10
|
1050 .Ve
|
yading@10
|
1051 .SS "oss"
|
yading@10
|
1052 .IX Subsection "oss"
|
yading@10
|
1053 \&\s-1OSS\s0 (Open Sound System) output device.
|
yading@10
|
1054 .SS "sdl"
|
yading@10
|
1055 .IX Subsection "sdl"
|
yading@10
|
1056 \&\s-1SDL\s0 (Simple DirectMedia Layer) output device.
|
yading@10
|
1057 .PP
|
yading@10
|
1058 This output devices allows to show a video stream in an \s-1SDL\s0
|
yading@10
|
1059 window. Only one \s-1SDL\s0 window is allowed per application, so you can
|
yading@10
|
1060 have only one instance of this output device in an application.
|
yading@10
|
1061 .PP
|
yading@10
|
1062 To enable this output device you need libsdl installed on your system
|
yading@10
|
1063 when configuring your build.
|
yading@10
|
1064 .PP
|
yading@10
|
1065 For more information about \s-1SDL\s0, check:
|
yading@10
|
1066 <\fBhttp://www.libsdl.org/\fR>
|
yading@10
|
1067 .PP
|
yading@10
|
1068 \fIOptions\fR
|
yading@10
|
1069 .IX Subsection "Options"
|
yading@10
|
1070 .IP "\fBwindow_title\fR" 4
|
yading@10
|
1071 .IX Item "window_title"
|
yading@10
|
1072 Set the \s-1SDL\s0 window title, if not specified default to the filename
|
yading@10
|
1073 specified for the output device.
|
yading@10
|
1074 .IP "\fBicon_title\fR" 4
|
yading@10
|
1075 .IX Item "icon_title"
|
yading@10
|
1076 Set the name of the iconified \s-1SDL\s0 window, if not specified it is set
|
yading@10
|
1077 to the same value of \fIwindow_title\fR.
|
yading@10
|
1078 .IP "\fBwindow_size\fR" 4
|
yading@10
|
1079 .IX Item "window_size"
|
yading@10
|
1080 Set the \s-1SDL\s0 window size, can be a string of the form
|
yading@10
|
1081 \&\fIwidth\fRx\fIheight\fR or a video size abbreviation.
|
yading@10
|
1082 If not specified it defaults to the size of the input video,
|
yading@10
|
1083 downscaled according to the aspect ratio.
|
yading@10
|
1084 .PP
|
yading@10
|
1085 \fIExamples\fR
|
yading@10
|
1086 .IX Subsection "Examples"
|
yading@10
|
1087 .PP
|
yading@10
|
1088 The following command shows the \fBffmpeg\fR output is an
|
yading@10
|
1089 \&\s-1SDL\s0 window, forcing its size to the qcif format:
|
yading@10
|
1090 .PP
|
yading@10
|
1091 .Vb 1
|
yading@10
|
1092 \& ffmpeg \-i INPUT \-vcodec rawvideo \-pix_fmt yuv420p \-window_size qcif \-f sdl "SDL output"
|
yading@10
|
1093 .Ve
|
yading@10
|
1094 .SS "sndio"
|
yading@10
|
1095 .IX Subsection "sndio"
|
yading@10
|
1096 sndio audio output device.
|
yading@10
|
1097 .SH "SEE ALSO"
|
yading@10
|
1098 .IX Header "SEE ALSO"
|
yading@10
|
1099 \&\fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIffserver\fR\|(1), \fIlibavdevice\fR\|(3)
|
yading@10
|
1100 .SH "AUTHORS"
|
yading@10
|
1101 .IX Header "AUTHORS"
|
yading@10
|
1102 The FFmpeg developers.
|
yading@10
|
1103 .PP
|
yading@10
|
1104 For details about the authorship, see the Git history of the project
|
yading@10
|
1105 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
|
yading@10
|
1106 \&\fBgit log\fR in the FFmpeg source directory, or browsing the
|
yading@10
|
1107 online repository at <\fBhttp://source.ffmpeg.org\fR>.
|
yading@10
|
1108 .PP
|
yading@10
|
1109 Maintainers for the specific components are listed in the file
|
yading@10
|
1110 \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.
|