2013-03-30 16:02:53 +00:00
|
|
|
@chapter Format Options
|
|
|
|
@c man begin FORMAT OPTIONS
|
|
|
|
|
|
|
|
The libavformat library provides some generic global options, which
|
|
|
|
can be set on all the muxers and demuxers. In addition each muxer or
|
|
|
|
demuxer may support so-called private options, which are specific for
|
|
|
|
that component.
|
|
|
|
|
|
|
|
Options may be set by specifying -@var{option} @var{value} in the
|
|
|
|
FFmpeg tools, or by setting the value explicitly in the
|
|
|
|
@code{AVFormatContext} options or using the @file{libavutil/opt.h} API
|
|
|
|
for programmatic use.
|
|
|
|
|
|
|
|
The list of supported options follows:
|
|
|
|
|
|
|
|
@table @option
|
|
|
|
@item avioflags @var{flags} (@emph{input/output})
|
|
|
|
Possible values:
|
|
|
|
@table @samp
|
|
|
|
@item direct
|
|
|
|
Reduce buffering.
|
|
|
|
@end table
|
|
|
|
|
|
|
|
@item probesize @var{integer} (@emph{input})
|
|
|
|
Set probing size in bytes, i.e. the size of the data to analyze to get
|
2015-03-07 18:36:07 +00:00
|
|
|
stream information. A higher value will enable detecting more
|
2013-03-30 16:02:53 +00:00
|
|
|
information in case it is dispersed into the stream, but will increase
|
|
|
|
latency. Must be an integer not lesser than 32. It is 5000000 by default.
|
|
|
|
|
2019-10-17 14:49:20 +00:00
|
|
|
@item max_probe_packets @var{integer} (@emph{input})
|
|
|
|
Set the maximum number of buffered packets when probing a codec.
|
|
|
|
Default is 2500 packets.
|
|
|
|
|
2013-03-30 16:02:53 +00:00
|
|
|
@item packetsize @var{integer} (@emph{output})
|
|
|
|
Set packet size.
|
|
|
|
|
2018-06-14 11:58:45 +00:00
|
|
|
@item fflags @var{flags}
|
|
|
|
Set format flags. Some are implemented for a limited number of formats.
|
2013-03-30 16:02:53 +00:00
|
|
|
|
2018-06-14 11:58:45 +00:00
|
|
|
Possible values for input files:
|
2013-03-30 16:02:53 +00:00
|
|
|
@table @samp
|
2018-06-14 11:58:45 +00:00
|
|
|
@item discardcorrupt
|
|
|
|
Discard corrupted packets.
|
2015-04-22 10:24:41 +00:00
|
|
|
@item fastseek
|
|
|
|
Enable fast, but inaccurate seeks for some formats.
|
2013-03-30 16:02:53 +00:00
|
|
|
@item genpts
|
2018-06-14 11:58:45 +00:00
|
|
|
Generate missing PTS if DTS is present.
|
|
|
|
@item igndts
|
|
|
|
Ignore DTS if PTS is set. Inert when nofillin is set.
|
|
|
|
@item ignidx
|
|
|
|
Ignore index.
|
|
|
|
@item nobuffer
|
|
|
|
Reduce the latency introduced by buffering during initial input streams analysis.
|
2013-03-30 16:02:53 +00:00
|
|
|
@item nofillin
|
2018-06-14 11:58:45 +00:00
|
|
|
Do not fill in missing values in packet fields that can be exactly calculated.
|
2013-03-30 16:02:53 +00:00
|
|
|
@item noparse
|
|
|
|
Disable AVParsers, this needs @code{+nofillin} too.
|
|
|
|
@item sortdts
|
2018-06-14 11:58:45 +00:00
|
|
|
Try to interleave output packets by DTS. At present, available only for AVIs with an index.
|
|
|
|
@end table
|
|
|
|
|
|
|
|
Possible values for output files:
|
|
|
|
@table @samp
|
|
|
|
@item autobsf
|
|
|
|
Automatically apply bitstream filters as required by the output format. Enabled by default.
|
2014-10-31 22:28:45 +00:00
|
|
|
@item bitexact
|
2014-10-31 22:45:43 +00:00
|
|
|
Only write platform-, build- and time-independent data.
|
2014-11-30 22:59:22 +00:00
|
|
|
This ensures that file and data checksums are reproducible and match between
|
2014-10-31 22:45:43 +00:00
|
|
|
platforms. Its primary use is for regression testing.
|
2018-06-14 11:58:45 +00:00
|
|
|
@item flush_packets
|
|
|
|
Write out packets immediately.
|
2016-08-12 19:28:08 +00:00
|
|
|
@item shortest
|
|
|
|
Stop muxing at the end of the shortest stream.
|
2016-10-29 14:55:14 +00:00
|
|
|
It may be needed to increase max_interleave_delta to avoid flushing the longer
|
2016-08-12 19:28:08 +00:00
|
|
|
streams before EOF.
|
2013-03-30 16:02:53 +00:00
|
|
|
@end table
|
|
|
|
|
2013-09-16 02:08:58 +00:00
|
|
|
@item seek2any @var{integer} (@emph{input})
|
2013-09-16 22:57:11 +00:00
|
|
|
Allow seeking to non-keyframes on demuxer level when supported if set to 1.
|
|
|
|
Default is 0.
|
2013-09-16 02:08:58 +00:00
|
|
|
|
2013-03-30 16:02:53 +00:00
|
|
|
@item analyzeduration @var{integer} (@emph{input})
|
|
|
|
Specify how many microseconds are analyzed to probe the input. A
|
2015-03-07 18:36:07 +00:00
|
|
|
higher value will enable detecting more accurate information, but will
|
2013-03-30 16:02:53 +00:00
|
|
|
increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
|
|
|
|
|
|
|
|
@item cryptokey @var{hexadecimal string} (@emph{input})
|
|
|
|
Set decryption key.
|
|
|
|
|
|
|
|
@item indexmem @var{integer} (@emph{input})
|
|
|
|
Set max memory used for timestamp index (per stream).
|
|
|
|
|
|
|
|
@item rtbufsize @var{integer} (@emph{input})
|
|
|
|
Set max memory used for buffering real-time frames.
|
|
|
|
|
|
|
|
@item fdebug @var{flags} (@emph{input/output})
|
|
|
|
Print specific debug info.
|
|
|
|
|
|
|
|
Possible values:
|
|
|
|
@table @samp
|
|
|
|
@item ts
|
|
|
|
@end table
|
|
|
|
|
|
|
|
@item max_delay @var{integer} (@emph{input/output})
|
|
|
|
Set maximum muxing or demuxing delay in microseconds.
|
|
|
|
|
|
|
|
@item fpsprobesize @var{integer} (@emph{input})
|
|
|
|
Set number of frames used to probe fps.
|
|
|
|
|
|
|
|
@item audio_preload @var{integer} (@emph{output})
|
|
|
|
Set microseconds by which audio packets should be interleaved earlier.
|
|
|
|
|
|
|
|
@item chunk_duration @var{integer} (@emph{output})
|
|
|
|
Set microseconds for each chunk.
|
|
|
|
|
|
|
|
@item chunk_size @var{integer} (@emph{output})
|
|
|
|
Set size in bytes for each chunk.
|
|
|
|
|
|
|
|
@item err_detect, f_err_detect @var{flags} (@emph{input})
|
|
|
|
Set error detection flags. @code{f_err_detect} is deprecated and
|
|
|
|
should be used only via the @command{ffmpeg} tool.
|
|
|
|
|
|
|
|
Possible values:
|
|
|
|
@table @samp
|
|
|
|
@item crccheck
|
|
|
|
Verify embedded CRCs.
|
|
|
|
@item bitstream
|
|
|
|
Detect bitstream specification deviations.
|
|
|
|
@item buffer
|
|
|
|
Detect improper bitstream length.
|
|
|
|
@item explode
|
|
|
|
Abort decoding on minor error detection.
|
|
|
|
@item careful
|
|
|
|
Consider things that violate the spec and have not been seen in the
|
|
|
|
wild as errors.
|
|
|
|
@item compliant
|
|
|
|
Consider all spec non compliancies as errors.
|
|
|
|
@item aggressive
|
|
|
|
Consider things that a sane encoder should not do as an error.
|
|
|
|
@end table
|
|
|
|
|
2015-06-01 15:15:20 +00:00
|
|
|
@item max_interleave_delta @var{integer} (@emph{output})
|
|
|
|
Set maximum buffering duration for interleaving. The duration is
|
2019-08-25 21:47:52 +00:00
|
|
|
expressed in microseconds, and defaults to 10000000 (10 seconds).
|
2015-06-01 15:15:20 +00:00
|
|
|
|
|
|
|
To ensure all the streams are interleaved correctly, libavformat will
|
|
|
|
wait until it has at least one packet for each stream before actually
|
|
|
|
writing any packets to the output file. When some streams are
|
|
|
|
"sparse" (i.e. there are large gaps between successive packets), this
|
|
|
|
can result in excessive buffering.
|
|
|
|
|
|
|
|
This field specifies the maximum difference between the timestamps of the
|
|
|
|
first and the last packet in the muxing queue, above which libavformat
|
|
|
|
will output a packet regardless of whether it has queued a packet for all
|
|
|
|
the streams.
|
|
|
|
|
|
|
|
If set to 0, libavformat will continue buffering packets until it has
|
|
|
|
a packet for each stream, regardless of the maximum timestamp
|
|
|
|
difference between the buffered packets.
|
|
|
|
|
2013-03-30 16:02:53 +00:00
|
|
|
@item use_wallclock_as_timestamps @var{integer} (@emph{input})
|
2016-02-18 13:47:10 +00:00
|
|
|
Use wallclock as timestamps if set to 1. Default is 0.
|
2013-03-30 16:02:53 +00:00
|
|
|
|
|
|
|
@item avoid_negative_ts @var{integer} (@emph{output})
|
2014-02-22 21:44:37 +00:00
|
|
|
|
|
|
|
Possible values:
|
|
|
|
@table @samp
|
|
|
|
@item make_non_negative
|
|
|
|
Shift timestamps to make them non-negative.
|
|
|
|
Also note that this affects only leading negative timestamps, and not
|
|
|
|
non-monotonic negative timestamps.
|
|
|
|
@item make_zero
|
|
|
|
Shift timestamps so that the first timestamp is 0.
|
|
|
|
@item auto (default)
|
|
|
|
Enables shifting when required by the target format.
|
|
|
|
@item disabled
|
|
|
|
Disables shifting of timestamp.
|
|
|
|
@end table
|
2013-03-30 16:02:53 +00:00
|
|
|
|
|
|
|
When shifting is enabled, all output timestamps are shifted by the
|
|
|
|
same amount. Audio, video, and subtitles desynching and relative
|
|
|
|
timestamp differences are preserved compared to how they would have
|
|
|
|
been without shifting.
|
|
|
|
|
2013-09-16 02:08:58 +00:00
|
|
|
@item skip_initial_bytes @var{integer} (@emph{input})
|
2013-09-16 22:57:11 +00:00
|
|
|
Set number of bytes to skip before reading header and frames if set to 1.
|
|
|
|
Default is 0.
|
2013-09-16 02:08:58 +00:00
|
|
|
|
|
|
|
@item correct_ts_overflow @var{integer} (@emph{input})
|
|
|
|
Correct single timestamp overflows if set to 1. Default is 1.
|
|
|
|
|
2013-03-30 16:02:53 +00:00
|
|
|
@item flush_packets @var{integer} (@emph{output})
|
2017-06-04 02:19:33 +00:00
|
|
|
Flush the underlying I/O stream after each packet. Default is -1 (auto), which
|
|
|
|
means that the underlying protocol will decide, 1 enables it, and has the
|
|
|
|
effect of reducing the latency, 0 disables it and may increase IO throughput in
|
|
|
|
some cases.
|
2014-01-27 18:16:45 +00:00
|
|
|
|
|
|
|
@item output_ts_offset @var{offset} (@emph{output})
|
|
|
|
Set the output time offset.
|
|
|
|
|
|
|
|
@var{offset} must be a time duration specification,
|
|
|
|
see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
|
|
|
|
|
|
|
|
The offset is added by the muxer to the output timestamps.
|
|
|
|
|
|
|
|
Specifying a positive offset means that the corresponding streams are
|
|
|
|
delayed bt the time duration specified in @var{offset}. Default value
|
|
|
|
is @code{0} (meaning that no offset is applied).
|
2014-10-31 00:36:47 +00:00
|
|
|
|
|
|
|
@item format_whitelist @var{list} (@emph{input})
|
2016-10-09 18:51:57 +00:00
|
|
|
"," separated list of allowed demuxers. By default all are allowed.
|
2014-10-31 00:36:47 +00:00
|
|
|
|
2014-10-31 22:05:02 +00:00
|
|
|
@item dump_separator @var{string} (@emph{input})
|
|
|
|
Separator used to separate the fields printed on the command line about the
|
|
|
|
Stream parameters.
|
2019-02-10 11:10:20 +00:00
|
|
|
For example, to separate the fields with newlines and indentation:
|
2014-10-31 22:05:02 +00:00
|
|
|
@example
|
|
|
|
ffprobe -dump_separator "
|
|
|
|
" -i ~/videos/matrixbench_mpeg2.mpg
|
|
|
|
@end example
|
2016-11-18 16:00:30 +00:00
|
|
|
|
|
|
|
@item max_streams @var{integer} (@emph{input})
|
|
|
|
Specifies the maximum number of streams. This can be used to reject files that
|
|
|
|
would require too many resources due to a large number of streams.
|
2018-07-24 22:49:39 +00:00
|
|
|
|
|
|
|
@item skip_estimate_duration_from_pts @var{bool} (@emph{input})
|
|
|
|
Skip estimation of input duration when calculated using PTS.
|
|
|
|
At present, applicable for MPEG-PS and MPEG-TS.
|
2019-06-08 12:07:44 +00:00
|
|
|
|
|
|
|
@item strict, f_strict @var{integer} (@emph{input/output})
|
|
|
|
Specify how strictly to follow the standards. @code{f_strict} is deprecated and
|
|
|
|
should be used only via the @command{ffmpeg} tool.
|
|
|
|
|
|
|
|
Possible values:
|
|
|
|
@table @samp
|
|
|
|
@item very
|
|
|
|
strictly conform to an older more strict version of the spec or reference software
|
|
|
|
@item strict
|
|
|
|
strictly conform to all the things in the spec no matter what consequences
|
|
|
|
@item normal
|
|
|
|
|
|
|
|
@item unofficial
|
|
|
|
allow unofficial extensions
|
|
|
|
@item experimental
|
|
|
|
allow non standardized experimental things, experimental
|
|
|
|
(unfinished/work in progress/not well tested) decoders and encoders.
|
|
|
|
Note: experimental decoders can pose a security risk, do not use this for
|
|
|
|
decoding untrusted input.
|
|
|
|
@end table
|
|
|
|
|
2013-03-30 16:02:53 +00:00
|
|
|
@end table
|
|
|
|
|
|
|
|
@c man end FORMAT OPTIONS
|
|
|
|
|
2013-07-06 08:27:19 +00:00
|
|
|
@anchor{Format stream specifiers}
|
|
|
|
@section Format stream specifiers
|
|
|
|
|
|
|
|
Format stream specifiers allow selection of one or more streams that
|
|
|
|
match specific properties.
|
|
|
|
|
|
|
|
The exact semantics of stream specifiers is defined by the
|
|
|
|
@code{avformat_match_stream_specifier()} function declared in the
|
2019-02-16 18:08:53 +00:00
|
|
|
@file{libavformat/avformat.h} header and documented in the
|
|
|
|
@ref{Stream specifiers,,Stream specifiers section in the ffmpeg(1) manual,ffmpeg}.
|
2013-07-06 08:27:19 +00:00
|
|
|
|
2014-01-09 05:19:52 +00:00
|
|
|
@ifclear config-writeonly
|
2013-03-30 16:02:53 +00:00
|
|
|
@include demuxers.texi
|
2014-01-09 05:19:52 +00:00
|
|
|
@end ifclear
|
|
|
|
@ifclear config-readonly
|
2013-03-30 16:02:53 +00:00
|
|
|
@include muxers.texi
|
2014-01-09 05:19:52 +00:00
|
|
|
@end ifclear
|
2013-03-30 16:02:53 +00:00
|
|
|
@include metadata.texi
|