Newer
Older
The filename passed as input is the capture driver number, ranging from
0 to 9. You may use "list" as filename to print a list of drivers. Any
other filename will be interpreted as device number 0.
@section x11grab
X11 video input device.
To enable this input device during configuration you need libxcb
installed on your system. It will be automatically detected during
configuration.
Alternatively, the configure option @option{--enable-x11grab} exists
for legacy Xlib users.
Andreas Cadhalpun
committed
This device allows one to capture a region of an X11 display.
The filename passed as input has the syntax:
@example
[@var{hostname}]:@var{display_number}.@var{screen_number}[+@var{x_offset},@var{y_offset}]
@end example
@var{hostname}:@var{display_number}.@var{screen_number} specifies the
X11 display name of the screen to grab from. @var{hostname} can be
omitted, and defaults to "localhost". The environment variable
@env{DISPLAY} contains the default display name.
@var{x_offset} and @var{y_offset} specify the offsets of the grabbed
area with respect to the top-left border of the X11 screen. They
Check the X11 documentation (e.g. @command{man X}) for more detailed
information.
Use the @command{xdpyinfo} program for getting basic information about
the properties of your X11 display (e.g. grep for "name" or
"dimensions").
For example to grab from @file{:0.0} using @command{ffmpeg}:
ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
@end example
Grab at position @code{10,20}:
@example
ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
@subsection Options
@table @option
@item draw_mouse
Specify whether to draw the mouse pointer. A value of @code{0} specify
not to draw the pointer. Default value is @code{1}.
@item follow_mouse
Make the grabbed area follow the mouse. The argument can be
@code{centered} or a number of pixels @var{PIXELS}.
When it is specified with "centered", the grabbing region follows the mouse
pointer and keeps the pointer at the center of region; otherwise, the region
follows only when the mouse pointer reaches within @var{PIXELS} (greater than
zero) to the edge of region.
For example:
@example
ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
To follow only when the mouse pointer reaches within 100 pixels to edge:
ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
@item framerate
Set the grabbing frame rate. Default value is @code{ntsc},
corresponding to a frame rate of @code{30000/1001}.
@item show_region
Show grabbed region on screen.
If @var{show_region} is specified with @code{1}, then the grabbing
region will be indicated on screen. With this option, it is easy to
know what is being grabbed if only a portion of the screen is grabbed.
@item region_border
Set the region border thickness if @option{-show_region 1} is used.
Range is 1 to 128 and default is 3 (XCB-based x11grab only).
ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
@end example
With @var{follow_mouse}:
@example
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
@item video_size
Set the video frame size. Default value is @code{vga}.
@item use_shm
Use the MIT-SHM extension for shared memory. Default value is @code{1}.
It may be necessary to disable it for remote displays (legacy x11grab
only).
@end table
@subsection @var{grab_x} @var{grab_y} AVOption
The syntax is:
@example
-grab_x @var{x_offset} -grab_y @var{y_offset}
@end example
Set the grabbing region coordinates. They are expressed as offset from the top left
corner of the X11 window. The default value is 0.
@section decklink
The decklink input device provides capture capabilities for Blackmagic
DeckLink devices.
To enable this input device, you need the Blackmagic DeckLink SDK and you
need to configure with the appropriate @code{--extra-cflags}
and @code{--extra-ldflags}.
On Windows, you need to run the IDL files through @command{widl}.
DeckLink is very picky about the formats it supports. Pixel format is
uyvy422 or v210, framerate and video size must be determined for your device with
@command{-list_formats 1}. Audio sample rate is always 48 kHz and the number
of channels can be 2, 8 or 16.
@subsection Options
@table @option
@item list_devices
If set to @option{true}, print a list of devices and exit.
Defaults to @option{false}.
@item list_formats
If set to @option{true}, print a list of supported formats and exit.
Defaults to @option{false}.
@item bm_v210
If set to @samp{1}, video is captured in 10 bit v210 instead
of uyvy422. Not all Blackmagic devices support this option.
@item bm_channels <CHANNELS>
Number of audio channels, can be 2, 8 or 16
@item bm_audiodepth <BITDEPTH>
Audio bit depth, can be 16 or 32.
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
@end table
@subsection Examples
@itemize
@item
List input devices:
@example
ffmpeg -f decklink -list_devices 1 -i dummy
@end example
@item
List supported formats:
@example
ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
@end example
@item
Capture video clip at 1080i50 (format 11):
@example
ffmpeg -f decklink -i 'Intensity Pro@@11' -acodec copy -vcodec copy output.avi
@end example
@item
Capture video clip at 1080i50 10 bit:
@example
ffmpeg -bm_v210 1 -f decklink -i 'UltraStudio Mini Recorder@@11' -acodec copy -vcodec copy output.avi
@end example
@item
Capture video clip at 720p50 with 32bit audio:
@example
ffmpeg -bm_audiodepth 32 -f decklink -i 'UltraStudio Mini Recorder@@14' -acodec copy -vcodec copy output.avi
@end example
@item
Capture video clip at 576i50 with 8 audio channels:
@example
ffmpeg -bm_channels 8 -f decklink -i 'UltraStudio Mini Recorder@@3' -acodec copy -vcodec copy output.avi
@end example
@c man end INPUT DEVICES