~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/doc/indevs.texi

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
To see the list of cards currently recognized by your system check the
43
43
files @file{/proc/asound/cards} and @file{/proc/asound/devices}.
44
44
 
45
 
For example to capture with @file{ffmpeg} from an ALSA device with
 
45
For example to capture with @command{avconv} from an ALSA device with
46
46
card id 0, you may run the command:
47
47
@example
48
 
ffmpeg -f alsa -i hw:0 alsaout.wav
 
48
avconv -f alsa -i hw:0 alsaout.wav
49
49
@end example
50
50
 
51
51
For more information see:
72
72
Documentation/fb/framebuffer.txt included in the Linux source tree.
73
73
 
74
74
To record from the framebuffer device @file{/dev/fb0} with
75
 
@file{ffmpeg}:
 
75
@command{avconv}:
76
76
@example
77
 
ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
 
77
avconv -f fbdev -r 10 -i /dev/fb0 out.avi
78
78
@end example
79
79
 
80
80
You can take a single screenshot image with the command:
81
81
@example
82
 
ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg
 
82
avconv -f fbdev -frames:v 1 -r 1 -i /dev/fb0 screenshot.jpeg
83
83
@end example
84
84
 
85
85
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
109
109
@file{jack_lsp}.
110
110
 
111
111
Follows an example which shows how to capture a JACK readable client
112
 
with @file{ffmpeg}.
 
112
with @command{avconv}.
113
113
@example
114
 
# Create a JACK writable client with name "ffmpeg".
115
 
$ ffmpeg -f jack -i ffmpeg -y out.wav
 
114
# Create a JACK writable client with name "libav".
 
115
$ avconv -f jack -i libav -y out.wav
116
116
 
117
117
# Start the sample jack_metro readable client.
118
118
$ jack_metro -b 120 -d 0.2 -f 4000
123
123
system:capture_2
124
124
system:playback_1
125
125
system:playback_2
126
 
ffmpeg:input_1
 
126
libav:input_1
127
127
metro:120_bpm
128
128
 
129
 
# Connect metro to the ffmpeg writable client.
130
 
$ jack_connect metro:120_bpm ffmpeg:input_1
 
129
# Connect metro to the avconv writable client.
 
130
$ jack_connect metro:120_bpm libav:input_1
131
131
@end example
132
132
 
133
133
For more information read:
145
145
representing the OSS input device, and is usually set to
146
146
@file{/dev/dsp}.
147
147
 
148
 
For example to grab from @file{/dev/dsp} using @file{ffmpeg} use the
 
148
For example to grab from @file{/dev/dsp} using @command{avconv} use the
149
149
command:
150
150
@example
151
 
ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
 
151
avconv -f oss -i /dev/dsp /tmp/oss.wav
152
152
@end example
153
153
 
154
154
For more information about OSS see:
155
155
@url{http://manuals.opensound.com/usersguide/dsp.html}
156
156
 
 
157
@section pulse
 
158
 
 
159
pulseaudio input device.
 
160
 
 
161
To enable this input device during configuration you need libpulse-simple
 
162
installed in your system.
 
163
 
 
164
The filename to provide to the input device is a source device or the
 
165
string "default"
 
166
 
 
167
To list the pulse source devices and their properties you can invoke
 
168
the command @file{pactl list sources}.
 
169
 
 
170
@example
 
171
avconv -f pulse -i default /tmp/pulse.wav
 
172
@end example
 
173
 
 
174
@subsection @var{server} AVOption
 
175
 
 
176
The syntax is:
 
177
@example
 
178
-server @var{server name}
 
179
@end example
 
180
 
 
181
Connects to a specific server.
 
182
 
 
183
@subsection @var{name} AVOption
 
184
 
 
185
The syntax is:
 
186
@example
 
187
-name @var{application name}
 
188
@end example
 
189
 
 
190
Specify the application name pulse will use when showing active clients,
 
191
by default it is "libav"
 
192
 
 
193
@subsection @var{stream_name} AVOption
 
194
 
 
195
The syntax is:
 
196
@example
 
197
-stream_name @var{stream name}
 
198
@end example
 
199
 
 
200
Specify the stream name pulse will use when showing active streams,
 
201
by default it is "record"
 
202
 
 
203
@subsection @var{sample_rate} AVOption
 
204
 
 
205
The syntax is:
 
206
@example
 
207
-sample_rate @var{samplerate}
 
208
@end example
 
209
 
 
210
Specify the samplerate in Hz, by default 48kHz is used.
 
211
 
 
212
@subsection @var{channels} AVOption
 
213
 
 
214
The syntax is:
 
215
@example
 
216
-channels @var{N}
 
217
@end example
 
218
 
 
219
Specify the channels in use, by default 2 (stereo) is set.
 
220
 
 
221
@subsection @var{frame_size} AVOption
 
222
 
 
223
The syntax is:
 
224
@example
 
225
-frame_size @var{bytes}
 
226
@end example
 
227
 
 
228
Specify the number of byte per frame, by default it is set to 1024.
 
229
 
 
230
@subsection @var{fragment_size} AVOption
 
231
 
 
232
The syntax is:
 
233
@example
 
234
-fragment_size @var{bytes}
 
235
@end example
 
236
 
 
237
Specify the minimal buffering fragment in pulseaudio, it will affect the
 
238
audio latency. By default it is unset.
 
239
 
157
240
@section sndio
158
241
 
159
242
sndio input device.
165
248
representing the sndio input device, and is usually set to
166
249
@file{/dev/audio0}.
167
250
 
168
 
For example to grab from @file{/dev/audio0} using @file{ffmpeg} use the
 
251
For example to grab from @file{/dev/audio0} using @command{avconv} use the
169
252
command:
170
253
@example
171
 
ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
 
254
avconv -f sndio -i /dev/audio0 /tmp/oss.wav
172
255
@end example
173
256
 
174
257
@section video4linux and video4linux2
184
267
Video4Linux and Video4Linux2 devices only support a limited set of
185
268
@var{width}x@var{height} sizes and framerates. You can check which are
186
269
supported for example with the command @file{dov4l} for Video4Linux
187
 
devices and the command @file{v4l-info} for Video4Linux2 devices.
 
270
devices and using @command{-list_formats all} for Video4Linux2 devices.
188
271
 
189
272
If the size for the device is set to 0x0, the input device will
190
273
try to autodetect the size to use.
199
282
@example
200
283
# Grab and show the input of a video4linux device, frame rate is set
201
284
# to the default of 25/1.
202
 
ffplay -s 320x240 -f video4linux /dev/video0
 
285
avplay -s 320x240 -f video4linux /dev/video0
203
286
 
204
287
# Grab and show the input of a video4linux2 device, autoadjust size.
205
 
ffplay -f video4linux2 /dev/video0
 
288
avplay -f video4linux2 /dev/video0
206
289
 
207
290
# Grab and record the input of a video4linux2 device, autoadjust size,
208
291
# frame rate value defaults to 0/0 so it is read from the video4linux2
209
292
# driver.
210
 
ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
 
293
avconv -f video4linux2 -i /dev/video0 out.mpeg
211
294
@end example
212
295
 
213
296
@section vfwcap
243
326
Use the @file{dpyinfo} program for getting basic information about the
244
327
properties of your X11 display (e.g. grep for "name" or "dimensions").
245
328
 
246
 
For example to grab from @file{:0.0} using @file{ffmpeg}:
 
329
For example to grab from @file{:0.0} using @command{avconv}:
247
330
@example
248
 
ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
 
331
avconv -f x11grab -r 25 -s cif -i :0.0 out.mpg
249
332
 
250
333
# Grab at position 10,20.
251
 
ffmpeg -f x11grab -25 -s cif -i :0.0+10,20 out.mpg
 
334
avconv -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
 
335
@end example
 
336
 
 
337
@subsection @var{follow_mouse} AVOption
 
338
 
 
339
The syntax is:
 
340
@example
 
341
-follow_mouse centered|@var{PIXELS}
 
342
@end example
 
343
 
 
344
When it is specified with "centered", the grabbing region follows the mouse
 
345
pointer and keeps the pointer at the center of region; otherwise, the region
 
346
follows only when the mouse pointer reaches within @var{PIXELS} (greater than
 
347
zero) to the edge of region.
 
348
 
 
349
For example:
 
350
@example
 
351
avconv -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
 
352
 
 
353
# Follows only when the mouse pointer reaches within 100 pixels to edge
 
354
avconv -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
 
355
@end example
 
356
 
 
357
@subsection @var{show_region} AVOption
 
358
 
 
359
The syntax is:
 
360
@example
 
361
-show_region 1
 
362
@end example
 
363
 
 
364
If @var{show_region} AVOption is specified with @var{1}, then the grabbing
 
365
region will be indicated on screen. With this option, it's easy to know what is
 
366
being grabbed if only a portion of the screen is grabbed.
 
367
 
 
368
For example:
 
369
@example
 
370
avconv -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
 
371
 
 
372
# With follow_mouse
 
373
avconv -f x11grab -follow_mouse centered -show_region 1  -r 25 -s cif -i :0.0 out.mpg
252
374
@end example
253
375
 
254
376
@c man end INPUT DEVICES