]> git.sesse.net Git - ffmpeg/blobdiff - doc/ffmpeg.texi
avdevice/decklink_dec: add support for 50/60 fps timecode
[ffmpeg] / doc / ffmpeg.texi
index 3717f22d4202c7b7f951322c1b18afdb5bbe35b1..95d6463685f02639331a4a64759954414cea5587 100644 (file)
@@ -523,6 +523,9 @@ The offset is added to the timestamps of the input files. Specifying
 a positive offset means that the corresponding streams are delayed by
 the time duration specified in @var{offset}.
 
+@item -itsscale @var{scale} (@emph{input,per-stream})
+Rescale input timestamps. @var{scale} should be a floating point number.
+
 @item -timestamp @var{date} (@emph{output})
 Set the recording timestamp in the container.
 
@@ -614,8 +617,13 @@ they do not conflict with the standard, as in:
 ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
 @end example
 
-@item -dn (@emph{output})
-Disable data recording. For full manual control see the @code{-map}
+@item -dn (@emph{input/output})
+As an input option, blocks all data streams of a file from being filtered or
+being automatically selected or mapped for any output. See @code{-discard}
+option to disable streams individually.
+
+As an output option, disables data recording i.e. automatic selection or
+mapping of any data stream. For full manual control see the @code{-map}
 option.
 
 @item -dframes @var{number} (@emph{output})
@@ -726,10 +734,6 @@ ffmpeg -dump_attachment:t "" -i INPUT
 Technical note -- attachments are implemented as codec extradata, so this
 option can actually be used to extract extradata from any stream, not just
 attachments.
-
-@item -noautorotate
-Disable automatically rotating video based on file metadata.
-
 @end table
 
 @section Video Options
@@ -775,8 +779,13 @@ If used together with @option{-vcodec copy}, it will affect the aspect ratio
 stored at container level, but not the aspect ratio stored in encoded
 frames, if it exists.
 
-@item -vn (@emph{output})
-Disable video recording. For full manual control see the @code{-map}
+@item -vn (@emph{input/output})
+As an input option, blocks all video streams of a file from being filtered or
+being automatically selected or mapped for any output. See @code{-discard}
+option to disable streams individually.
+
+As an output option, disables video recording i.e. automatic selection or
+mapping of any video stream. For full manual control see the @code{-map}
 option.
 
 @item -vcodec @var{codec} (@emph{output})
@@ -806,6 +815,18 @@ Create the filtergraph specified by @var{filtergraph} and use it to
 filter the stream.
 
 This is an alias for @code{-filter:v}, see the @ref{filter_option,,-filter option}.
+
+@item -autorotate
+Automatically rotate the video according to file metadata. Enabled by
+default, use @option{-noautorotate} to disable it.
+
+@item -autoscale
+Automatically scale the video according to the resolution of first frame.
+Enabled by default, use @option{-noautoscale} to disable it. When autoscale is
+disabled, all output frames of filter graph might not be in the same resolution
+and may be inadequate for some encoder/muxer. Therefore, it is not recommended
+to disable it unless you really know what you are doing.
+Disable autoscale at your own risk.
 @end table
 
 @section Advanced Video options
@@ -835,8 +856,8 @@ factor if negative.
 Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
 Use this option if your input file is interlaced and you want
 to keep the interlaced format for minimum losses.
-The alternative is to deinterlace the input stream with
-@option{-deinterlace}, but deinterlacing introduces losses.
+The alternative is to deinterlace the input stream by use of a filter
+such as @code{yadif} or @code{bwdif}, but deinterlacing introduces losses.
 @item -psnr
 Calculate PSNR of compressed frames.
 @item -vstats
@@ -866,12 +887,19 @@ Deprecated see -bsf
 
 @item -force_key_frames[:@var{stream_specifier}] @var{time}[,@var{time}...] (@emph{output,per-stream})
 @item -force_key_frames[:@var{stream_specifier}] expr:@var{expr} (@emph{output,per-stream})
-Force key frames at the specified timestamps, more precisely at the first
-frames after each specified time.
+@item -force_key_frames[:@var{stream_specifier}] source (@emph{output,per-stream})
 
-If the argument is prefixed with @code{expr:}, the string @var{expr}
-is interpreted like an expression and is evaluated for each frame. A
-key frame is forced in case the evaluation is non-zero.
+@var{force_key_frames} can take arguments of the following form:
+
+@table @option
+
+@item @var{time}[,@var{time}...]
+If the argument consists of timestamps, ffmpeg will round the specified times to the nearest
+output timestamp as per the encoder time base and force a keyframe at the first frame having
+timestamp equal or greater than the computed timestamp. Note that if the encoder time base is too
+coarse, then the keyframes may be forced on frames with timestamps lower than the specified time.
+The default encoder time base is the inverse of the output framerate but may be set otherwise
+via @code{-enc_time_base}.
 
 If one of the times is "@code{chapters}[@var{delta}]", it is expanded into
 the time of the beginning of all chapters in the file, shifted by
@@ -885,6 +913,11 @@ before the beginning of every chapter:
 -force_key_frames 0:05:00,chapters-0.1
 @end example
 
+@item expr:@var{expr}
+If the argument is prefixed with @code{expr:}, the string @var{expr}
+is interpreted like an expression and is evaluated for each frame. A
+key frame is forced in case the evaluation is non-zero.
+
 The expression in @var{expr} can contain the following constants:
 @table @option
 @item n
@@ -912,6 +945,12 @@ starting from second 13:
 -force_key_frames expr:if(isnan(prev_forced_t),gte(t,13),gte(t,prev_forced_t+5))
 @end example
 
+@item source
+If the argument is @code{source}, ffmpeg will force a key frame if
+the current frame being encoded is marked as a key frame in its source.
+
+@end table
+
 Note that forcing too many keyframes is very harmful for the lookahead
 algorithms of certain encoders: using fixed-GOP options or similar
 would be more efficient.
@@ -998,6 +1037,35 @@ Choose the GPU device on the second platform supporting the @emph{cl_khr_fp16}
 extension.
 @end table
 
+@item vulkan
+If @var{device} is an integer, it selects the device by its index in a
+system-dependent list of devices.  If @var{device} is any other string, it
+selects the first device with a name containing that string as a substring.
+
+The following options are recognized:
+@table @option
+@item debug
+If set to 1, enables the validation layer, if installed.
+@item linear_images
+If set to 1, images allocated by the hwcontext will be linear and locally mappable.
+@item instance_extensions
+A plus separated list of additional instance extensions to enable.
+@item device_extensions
+A plus separated list of additional device extensions to enable.
+@end table
+
+Examples:
+@table @emph
+@item -init_hw_device vulkan:1
+Choose the second device on the system.
+
+@item -init_hw_device vulkan:RADV
+Choose the first device with a name containing the string @emph{RADV}.
+
+@item -init_hw_device vulkan:0,instance_extensions=VK_KHR_wayland_surface+VK_KHR_xcb_surface
+Choose the first device and enable the Wayland and XCB instance extensions.
+@end table
+
 @end table
 
 @item -init_hw_device @var{type}[=@var{name}]@@@var{source}
@@ -1089,8 +1157,13 @@ Set the number of audio channels. For output streams it is set by
 default to the number of input audio channels. For input streams
 this option only makes sense for audio grabbing devices and raw demuxers
 and is mapped to the corresponding demuxer options.
-@item -an (@emph{output})
-Disable audio recording. For full manual control see the @code{-map}
+@item -an (@emph{input/output})
+As an input option, blocks all audio streams of a file from being filtered or
+being automatically selected or mapped for any output. See @code{-discard}
+option to disable streams individually.
+
+As an output option, disables audio recording i.e. automatic selection or
+mapping of any audio stream. For full manual control see the @code{-map}
 option.
 @item -acodec @var{codec} (@emph{input/output})
 Set the audio codec. This is an alias for @code{-codec:a}.
@@ -1125,8 +1198,13 @@ stereo but not 6 channels as 5.1. The default is to always try to guess. Use
 @table @option
 @item -scodec @var{codec} (@emph{input/output})
 Set the subtitle codec. This is an alias for @code{-codec:s}.
-@item -sn (@emph{output})
-Disable subtitle recording. For full manual control see the @code{-map}
+@item -sn (@emph{input/output})
+As an input option, blocks all subtitle streams of a file from being filtered or
+being automatically selected or mapped for any output. See @code{-discard}
+option to disable streams individually.
+
+As an output option, disables subtitle recording i.e. automatic selection or
+mapping of any subtitle stream. For full manual control see the @code{-map}
 option.
 @item -sbsf @var{bitstream_filter}
 Deprecated, see -bsf
@@ -1360,7 +1438,7 @@ it will usually display as 0 if not supported.
 Show benchmarking information during the encode.
 Shows real, system and user time used in various steps (audio/video encode/decode).
 @item -timelimit @var{duration} (@emph{global})
-Exit after ffmpeg has been running for @var{duration} seconds.
+Exit after ffmpeg has been running for @var{duration} seconds in CPU user time.
 @item -dump (@emph{global})
 Dump each input packet to stderr.
 @item -hex (@emph{global})
@@ -1373,10 +1451,6 @@ loss).
 By default @command{ffmpeg} attempts to read the input(s) as fast as possible.
 This option will slow down the reading of the input(s) to the native frame rate
 of the input(s). It is useful for real-time output (e.g. live streaming).
-@item -loop_output @var{number_of_times}
-Repeatedly loop output for formats that support looping such as animated GIF
-(0 will loop the output infinitely).
-This option is deprecated, use -loop.
 @item -vsync @var{parameter}
 Video sync method.
 For compatibility reasons old values can be specified as numbers.
@@ -1496,9 +1570,13 @@ Enable bitexact mode for (de)muxer and (de/en)coder
 Finish encoding when the shortest input stream ends.
 @item -dts_delta_threshold
 Timestamp discontinuity delta threshold.
-@item -muxdelay @var{seconds} (@emph{input})
+@item -dts_error_threshold @var{seconds}
+Timestamp error delta threshold. This threshold use to discard crazy/damaged
+timestamps and the default is 30 hours which is arbitrarily picked and quite
+conservative.
+@item -muxdelay @var{seconds} (@emph{output})
 Set the maximum demux-decode delay.
-@item -muxpreload @var{seconds} (@emph{input})
+@item -muxpreload @var{seconds} (@emph{output})
 Set the initial demux-decode delay.
 @item -streamid @var{output-stream-index}:@var{new-value} (@emph{output})
 Assign a new stream-id value to an output stream. This option should be
@@ -1611,8 +1689,9 @@ not start from timestamp 0, such as transport streams.
 @item -thread_queue_size @var{size} (@emph{input})
 This option sets the maximum number of queued packets when reading from the
 file or device. With low latency / high rate live streams, packets may be
-discarded if they are not read in a timely manner; raising this value can
-avoid it.
+discarded if they are not read in a timely manner; setting this value can
+force ffmpeg to use a separate input thread and read packets as soon as they
+arrive. By default ffmpeg only do this if multiple inputs are specified.
 
 @item -sdp_file @var{file} (@emph{global})
 Print sdp information for an output stream to @var{file}.
@@ -1620,8 +1699,10 @@ This allows dumping sdp information when at least one output isn't an
 rtp stream. (Requires at least one of the output formats to be rtp).
 
 @item -discard (@emph{input})
-Allows discarding specific streams or frames of streams at the demuxer.
-Not all demuxers support this.
+Allows discarding specific streams or frames from streams.
+Any input stream can be fully discarded, using value @code{all} whereas
+selective discarding of frames from a stream occurs at the demuxer
+and is not supported by all demuxers.
 
 @table @option
 @item none
@@ -1649,6 +1730,8 @@ Stop and abort on various conditions. The following flags are available:
 @table @option
 @item empty_output
 No packets were passed to the muxer, the output is empty.
+@item empty_output_stream
+No packets were passed to the muxer in some of the output streams.
 @end table
 
 @item -xerror (@emph{global})
@@ -1663,6 +1746,21 @@ this buffer, in packets, for the matching output stream.
 The default value of this option should be high enough for most uses, so only
 touch this option if you are sure that you need it.
 
+@item -muxing_queue_data_threshold @var{bytes} (@emph{output,per-stream})
+This is a minimum threshold until which the muxing queue size is not taken into
+account. Defaults to 50 megabytes per stream, and is based on the overall size
+of packets passed to the muxer.
+
+@item -auto_conversion_filters (@emph{global})
+Enable automatically inserting format conversion filters in all filter
+graphs, including those defined by @option{-vf}, @option{-af},
+@option{-filter_complex} and @option{-lavfi}. If filter format negotiation
+requires a conversion, the initialization of the filters will fail.
+Conversions can still be performed by inserting the relevant conversion
+filter (scale, aresample) in the graph.
+On by default, to explicitly disable it you need to specify
+@code{-noauto_conversion_filters}.
+
 @end table
 
 As a special exception, you can use a bitmap subtitle stream as input: it
@@ -1957,6 +2055,7 @@ ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
 @ifset config-avfilter
 @include filters.texi
 @end ifset
+@include general_contents.texi
 @end ifset
 
 @chapter See Also