]> git.sesse.net Git - ffmpeg/blobdiff - doc/indevs.texi
avdevice/xcbgrab: Add select_region option
[ffmpeg] / doc / indevs.texi
index 1f30f2360f4652ca13e50bcb86d59f849f205728..62b6ebb3e37a4a4449f5800c46b6b830406e229e 100644 (file)
@@ -178,6 +178,9 @@ Capture the mouse pointer. Default is 0.
 @item -capture_mouse_clicks
 Capture the screen mouse clicks. Default is 0.
 
+@item -capture_raw_data
+Capture the raw device data. Default is 0.
+Using this option may result in receiving the underlying data delivered to the AVFoundation framework. E.g. for muxed devices that sends raw DV data to the framework (like tape-based camcorders), setting this option to false results in extracted video frames captured in the designated pixel format only. Setting this option to true results in receiving the raw DV stream untouched.
 @end table
 
 @subsection Examples
@@ -208,6 +211,13 @@ Record video from the system default video device using the pixel format bgr0 an
 $ ffmpeg -f avfoundation -pixel_format bgr0 -i "default:none" out.avi
 @end example
 
+@item
+Record raw DV data from a suitable input device and write the output into out.dv:
+@example
+$ ffmpeg -f avfoundation -capture_raw_data true -i "zr100:none" out.dv
+@end example
+
+
 @end itemize
 
 @section bktr
@@ -267,8 +277,8 @@ audio track.
 
 @item list_devices
 If set to @option{true}, print a list of devices and exit.
-Defaults to @option{false}. Alternatively you can use the @code{-sources}
-option of ffmpeg to list the available input devices.
+Defaults to @option{false}. This option is deprecated, please use the
+@code{-sources} option of ffmpeg to list the available input devices.
 
 @item list_formats
 If set to @option{true}, print a list of supported formats and exit.
@@ -282,25 +292,35 @@ as @option{pal} (3 letters).
 Default behavior is autodetection of the input video format, if the hardware
 supports it.
 
-@item bm_v210
-This is a deprecated option, you can use @option{raw_format} instead.
-If set to @samp{1}, video is captured in 10 bit v210 instead
-of uyvy422. Not all Blackmagic devices support this option.
-
 @item raw_format
 Set the pixel format of the captured video.
 Available values are:
 @table @samp
+@item auto
+
+This is the default which means 8-bit YUV 422 or 8-bit ARGB if format
+autodetection is used, 8-bit YUV 422 otherwise.
+
 @item uyvy422
 
+8-bit YUV 422.
+
 @item yuv422p10
 
+10-bit YUV 422.
+
 @item argb
 
+8-bit RGB.
+
 @item bgra
 
+8-bit RGB.
+
 @item rgb10
 
+10-bit RGB.
+
 @end table
 
 @item teletext_lines
@@ -330,8 +350,8 @@ Defaults to @samp{unset}.
 @item timecode_format
 Timecode type to include in the frame and video stream metadata. Must be
 @samp{none}, @samp{rp188vitc}, @samp{rp188vitc2}, @samp{rp188ltc},
-@samp{rp188any}, @samp{vitc}, @samp{vitc2}, or @samp{serial}. Defaults to
-@samp{none} (not included).
+@samp{rp188hfr}, @samp{rp188any}, @samp{vitc}, @samp{vitc2}, or @samp{serial}.
+Defaults to @samp{none} (not included).
 
 @item video_input
 Sets the video input source. Must be @samp{unset}, @samp{sdi}, @samp{hdmi},
@@ -374,7 +394,7 @@ Defaults to @option{false}.
 @item timestamp_align
 Capture start time alignment in seconds. If set to nonzero, input frames are
 dropped till the system timestamp aligns with configured value.
-Alignment difference of upto one frame duration is tolerated.
+Alignment difference of up to one frame duration is tolerated.
 This is useful for maintaining input synchronization across N different
 hardware devices deployed for 'N-way' redundancy. The system time of different
 hardware devices should be synchronized with protocols such as NTP or PTP,
@@ -385,6 +405,20 @@ Either sync could go wrong by 1 frame or in a rarer case
 @option{timestamp_align} seconds.
 Defaults to @samp{0}.
 
+@item wait_for_tc (@emph{bool})
+Drop frames till a frame with timecode is received. Sometimes serial timecode
+isn't received with the first input frame. If that happens, the stored stream
+timecode will be inaccurate. If this option is set to @option{true}, input frames
+are dropped till a frame with timecode is received.
+Option @var{timecode_format} must be specified.
+Defaults to @option{false}.
+
+@item enable_klv(@emph{bool})
+If set to @option{true}, extracts KLV data from VANC and outputs KLV packets.
+KLV VANC packets are joined based on MID and PSC fields and aggregated into
+one KLV packet.
+Defaults to @option{false}.
+
 @end table
 
 @subsection Examples
@@ -394,7 +428,7 @@ Defaults to @samp{0}.
 @item
 List input devices:
 @example
-ffmpeg -f decklink -list_devices 1 -i dummy
+ffmpeg -sources decklink
 @end example
 
 @item
@@ -412,7 +446,7 @@ ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy outp
 @item
 Capture video clip at 1080i50 10 bit:
 @example
-ffmpeg -bm_v210 1 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
+ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
 @end example
 
 @item
@@ -870,11 +904,15 @@ If you don't understand what all of that means, you probably don't want this.  L
 DRM device to capture on.  Defaults to @option{/dev/dri/card0}.
 
 @item format
-Pixel format of the framebuffer.  Defaults to @option{bgr0}.
+Pixel format of the framebuffer.  This can be autodetected if you are running Linux 5.7
+or later, but needs to be provided for earlier versions.  Defaults to @option{bgr0},
+which is the most common format used by the Linux console and Xorg X server.
 
 @item format_modifier
 Format modifier to signal on output frames.  This is necessary to import correctly into
-some APIs, but can't be autodetected.  See the libdrm documentation for possible values.
+some APIs.  It can be autodetected if you are running Linux 5.7 or later, but will need
+to be provided explicitly when needed in earlier versions.  See the libdrm documentation
+for possible values.
 
 @item crtc_id
 KMS CRTC ID to define the capture source.  The first active plane on the given CRTC
@@ -910,6 +948,14 @@ Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert to NV12 and e
 ffmpeg -crtc_id 42 -framerate 60 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12' -c:v h264_vaapi output.mp4
 @end example
 
+@item
+To capture only part of a plane the output can be cropped - this can be used to capture
+a single window, as long as it has a known absolute position and size.  For example, to
+capture and encode the middle quarter of a 1920x1080 plane:
+@example
+ffmpeg -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,crop=960:540:480:270,scale_vaapi=960:540:nv12' -c:v h264_vaapi output.mp4
+@end example
+
 @end itemize
 
 @section lavfi
@@ -1050,71 +1096,21 @@ IIDC1394 input device, based on libdc1394 and libraw1394.
 
 Requires the configure option @code{--enable-libdc1394}.
 
-@section libndi_newtek
-
-The libndi_newtek input device provides capture capabilities for using NDI (Network
-Device Interface, standard created by NewTek).
-
-Input filename is a NDI source name that could be found by sending -find_sources 1
-to command line - it has no specific syntax but human-readable formatted.
-
-To enable this input device, you need the NDI SDK and you
-need to configure with the appropriate @code{--extra-cflags}
-and @code{--extra-ldflags}.
-
 @subsection Options
-
 @table @option
 
-@item find_sources
-If set to @option{true}, print a list of found/available NDI sources and exit.
-Defaults to @option{false}.
-
-@item wait_sources
-Override time to wait until the number of online sources have changed.
-Defaults to @option{0.5}.
-
-@item allow_video_fields
-When this flag is @option{false}, all video that you receive will be progressive.
-Defaults to @option{true}.
+@item framerate
+Set the frame rate. Default is @code{ntsc}, corresponding to a frame
+rate of @code{30000/1001}.
 
-@item extra_ips
-If is set to list of comma separated ip addresses, scan for sources not only
-using mDNS but also use unicast ip addresses specified by this list.
+@item pixel_format
+Select the pixel format. Default is @code{uyvy422}.
 
+@item video_size
+Set the video size given as a string such as @code{640x480} or @code{hd720}.
+Default is @code{qvga}.
 @end table
 
-@subsection Examples
-
-@itemize
-
-@item
-List input devices:
-@example
-ffmpeg -f libndi_newtek -find_sources 1 -i dummy
-@end example
-
-@item
-List local and remote input devices:
-@example
-ffmpeg -f libndi_newtek -extra_ips "192.168.10.10" -find_sources 1 -i dummy
-@end example
-
-@item
-Restream to NDI:
-@example
-ffmpeg -f libndi_newtek -i "DEV-5.INTERNAL.M1STEREO.TV (NDI_SOURCE_NAME_1)" -f libndi_newtek -y NDI_SOURCE_NAME_2
-@end example
-
-@item
-Restream remote NDI to local NDI:
-@example
-ffmpeg -f libndi_newtek -extra_ips "192.168.10.10" -i "DEV-5.REMOTE.M1STEREO.TV (NDI_SOURCE_NAME_1)" -f libndi_newtek -y NDI_SOURCE_NAME_2
-@end example
-
-
-@end itemize
-
 @section openal
 
 The OpenAL input device provides audio capture on all systems with a
@@ -1507,6 +1503,14 @@ ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
 @subsection Options
 
 @table @option
+@item select_region
+Specify whether to select the grabbing area graphically using the pointer.
+A value of @code{1} prompts the user to select the grabbing area graphically
+by clicking and dragging. A single click with no dragging will select the
+whole screen. A region with zero width or height will also select the whole
+screen. This option overwrites the @var{video_size}, @var{grab_x}, and
+@var{grab_y} options. Default value is @code{0}.
+
 @item draw_mouse
 Specify whether to draw the mouse pointer. A value of @code{0} specifies
 not to draw the pointer. Default value is @code{1}.
@@ -1556,7 +1560,7 @@ ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_siz
 @end example
 
 @item video_size
-Set the video frame size. Default value is @code{vga}.
+Set the video frame size. Default is the full desktop.
 
 @item grab_x
 @item grab_y