]> git.sesse.net Git - ffmpeg/blobdiff - doc/indevs.texi
avfilter/f_cue: use inlink fifo for queueing frames
[ffmpeg] / doc / indevs.texi
index 0bc8e6a9b1beab5e020babb052bc72dc9dea8761..9a9cb697d35f8a5c0394946a7a8e15e55745bd6d 100644 (file)
@@ -63,6 +63,46 @@ Set the number of channels. Default is 2.
 
 @end table
 
+@section android_camera
+
+Android camera input device.
+
+This input devices uses the Android Camera2 NDK API which is
+available on devices with API level 24+. The availability of
+android_camera is autodetected during configuration.
+
+This device allows capturing from all cameras on an Android device,
+which are integrated into the Camera2 NDK API.
+
+The available cameras are enumerated internally and can be selected
+with the @var{camera_index} parameter. The input file string is
+discarded.
+
+Generally the back facing camera has index 0 while the front facing
+camera has index 1.
+
+@subsection Options
+
+@table @option
+
+@item video_size
+Set the video size given as a string such as 640x480 or hd720.
+Falls back to the first available configuration reported by
+Android if requested video size is not available or by default.
+
+@item framerate
+Set the video framerate.
+Falls back to the first available configuration reported by
+Android if requested framerate is not available or by default (-1).
+
+@item camera_index
+Set the index of the camera to use. Default is 0.
+
+@item input_queue_size
+Set the maximum number of frames to buffer. Default is 5.
+
+@end table
+
 @section avfoundation
 
 AVFoundation input device.
@@ -227,7 +267,8 @@ audio track.
 
 @item list_devices
 If set to @option{true}, print a list of devices and exit.
-Defaults to @option{false}.
+Defaults to @option{false}. Alternatively you can 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.
@@ -286,6 +327,12 @@ Defaults to @samp{2}.
 Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or @samp{full}.
 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).
+
 @item video_input
 Sets the video input source. Must be @samp{unset}, @samp{sdi}, @samp{hdmi},
 @samp{optical_sdi}, @samp{component}, @samp{composite} or @samp{s_video}.
@@ -324,6 +371,20 @@ If set to @option{true}, timestamps are forwarded as they are without removing
 the initial offset.
 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.
+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,
+before using this option.
+Note that this method is not foolproof. In some border cases input
+synchronization may not happen due to thread scheduling jitters in the OS.
+Either sync could go wrong by 1 frame or in a rarer case
+@option{timestamp_align} seconds.
+Defaults to @samp{0}.
+
 @end table
 
 @subsection Examples
@@ -362,116 +423,6 @@ ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder'
 
 @end itemize
 
-@section kmsgrab
-
-KMS video input device.
-
-Captures the KMS scanout framebuffer associated with a specified CRTC or plane as a
-DRM object that can be passed to other hardware functions.
-
-Requires either DRM master or CAP_SYS_ADMIN to run.
-
-If you don't understand what all of that means, you probably don't want this.  Look at
-@option{x11grab} instead.
-
-@subsection Options
-
-@table @option
-
-@item device
-DRM device to capture on.  Defaults to @option{/dev/dri/card0}.
-
-@item format
-Pixel format of the framebuffer.  Defaults to @option{bgr0}.
-
-@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.
-
-@item crtc_id
-KMS CRTC ID to define the capture source.  The first active plane on the given CRTC
-will be used.
-
-@item plane_id
-KMS plane ID to define the capture source.  Defaults to the first active plane found if
-neither @option{crtc_id} nor @option{plane_id} are specified.
-
-@item framerate
-Framerate to capture at.  This is not synchronised to any page flipping or framebuffer
-changes - it just defines the interval at which the framebuffer is sampled.  Sampling
-faster than the framebuffer update rate will generate independent frames with the same
-content.  Defaults to @code{30}.
-
-@end table
-
-@subsection Examples
-
-@itemize
-
-@item
-Capture from the first active plane, download the result to normal frames and encode.
-This will only work if the framebuffer is both linear and mappable - if not, the result
-may be scrambled or fail to download.
-@example
-ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4
-@end example
-
-@item
-Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert to NV12 and encode as H.264.
-@example
-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
-
-@end itemize
-
-@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}.
-
-@end table
-
-@subsection Examples
-
-@itemize
-
-@item
-List input devices:
-@example
-ffmpeg -f libndi_newtek -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
-
-@end itemize
-
 @section dshow
 
 Windows DirectShow input device.
@@ -899,6 +850,68 @@ Set the number of channels. Default is 2.
 
 @end table
 
+@section kmsgrab
+
+KMS video input device.
+
+Captures the KMS scanout framebuffer associated with a specified CRTC or plane as a
+DRM object that can be passed to other hardware functions.
+
+Requires either DRM master or CAP_SYS_ADMIN to run.
+
+If you don't understand what all of that means, you probably don't want this.  Look at
+@option{x11grab} instead.
+
+@subsection Options
+
+@table @option
+
+@item device
+DRM device to capture on.  Defaults to @option{/dev/dri/card0}.
+
+@item format
+Pixel format of the framebuffer.  Defaults to @option{bgr0}.
+
+@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.
+
+@item crtc_id
+KMS CRTC ID to define the capture source.  The first active plane on the given CRTC
+will be used.
+
+@item plane_id
+KMS plane ID to define the capture source.  Defaults to the first active plane found if
+neither @option{crtc_id} nor @option{plane_id} are specified.
+
+@item framerate
+Framerate to capture at.  This is not synchronised to any page flipping or framebuffer
+changes - it just defines the interval at which the framebuffer is sampled.  Sampling
+faster than the framebuffer update rate will generate independent frames with the same
+content.  Defaults to @code{30}.
+
+@end table
+
+@subsection Examples
+
+@itemize
+
+@item
+Capture from the first active plane, download the result to normal frames and encode.
+This will only work if the framebuffer is both linear and mappable - if not, the result
+may be scrambled or fail to download.
+@example
+ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4
+@end example
+
+@item
+Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert to NV12 and encode as H.264.
+@example
+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
+
+@end itemize
+
 @section lavfi
 
 Libavfilter input virtual device.
@@ -1037,6 +1050,54 @@ 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}.
+
+@end table
+
+@subsection Examples
+
+@itemize
+
+@item
+List input devices:
+@example
+ffmpeg -f libndi_newtek -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
+
+@end itemize
+
 @section openal
 
 The OpenAL input device provides audio capture on all systems with a
@@ -1155,7 +1216,6 @@ Set the number of channels. Default is 2.
 
 @end table
 
-
 @section pulse
 
 PulseAudio input device.