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 -OPTION VALUE in the FFmpeg tools, or by setting the value explicitly in the AVFormatContext options or using the libavutil/opt.h API for programmatic use.

The list of supported options follows:

avioflags FLAGS (input/output)
     Possible values:

     direct
          Reduce buffering.

probesize INTEGER (input)
     Set probing size in bytes, i.e. the size of the data to analyze to get stream information. A higher value will enable detecting more 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.

packetsize INTEGER (output)
     Set packet size.

fflags FLAGS (input/output)
     Set format flags.

     Possible values:

     ignidx
          Ignore index.

     genpts
          Generate PTS.

     nofillin
          Do not fill in missing values that can be exactly calculated.

     noparse
          Disable AVParsers, this needs +nofillin too.

     igndts
          Ignore DTS.

     discardcorrupt
          Discard corrupted frames.

     sortdts
          Try to interleave output packets by DTS.

     keepside
          Do not merge side data.

     latm
          Enable RTP MP4A-LATM payload.

     nobuffer
          Reduce the latency introduced by optional buffering

     bitexact
          Only write platform-, build- and time-independent data. This ensures that file and data checksums are reproducible and match between platforms. Its primary use is for regression testing.

seek2any INTEGER (input)
     Allow seeking to non-keyframes on demuxer level when supported if set to 1. Default is 0.

analyzeduration INTEGER (input)
     Specify how many microseconds are analyzed to probe the input. A higher value will enable detecting more accurate information, but will increase latency. It defaults to 5,000,000 microseconds = 5 seconds.

cryptokey HEXADECIMAL STRING (input)
     Set decryption key.

indexmem INTEGER (input)
     Set max memory used for timestamp index (per stream).

rtbufsize INTEGER (input)
     Set max memory used for buffering real-time frames.

fdebug FLAGS (input/output)
     Print specific debug info.

     Possible values:

     ts

max_delay INTEGER (input/output)
     Set maximum muxing or demuxing delay in microseconds.

fpsprobesize INTEGER (input)
     Set number of frames used to probe fps.

audio_preload INTEGER (output)
     Set microseconds by which audio packets should be interleaved earlier.

chunk_duration INTEGER (output)
     Set microseconds for each chunk.

chunk_size INTEGER (output)
     Set size in bytes for each chunk.

err_detect, f_err_detect FLAGS (input)
     Set error detection flags. f_err_detect is deprecated and should be used only via the ffmpeg tool.

     Possible values:

     crccheck
          Verify embedded CRCs.

     bitstream
          Detect bitstream specification deviations.

     buffer
          Detect improper bitstream length.

     explode
          Abort decoding on minor error detection.

     careful
          Consider things that violate the spec and have not been seen in the wild as errors.

     compliant
          Consider all spec non compliancies as errors.

     aggressive
          Consider things that a sane encoder should not do as an error.

use_wallclock_as_timestamps INTEGER (input)
     Use wallclock as timestamps.

avoid_negative_ts INTEGER (output)

     Possible values:

     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.

     make_zero
          Shift timestamps so that the first timestamp is 0.

     auto (default)
          Enables shifting when required by the target format.

     disabled
          Disables shifting of timestamp.

     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.

skip_initial_bytes INTEGER (input)
     Set number of bytes to skip before reading header and frames if set to 1. Default is 0.

correct_ts_overflow INTEGER (input)
     Correct single timestamp overflows if set to 1. Default is 1.

flush_packets INTEGER (output)
     Flush the underlying I/O stream after each packet. Default 1 enables it, and has the effect of reducing the latency; 0 disables it and may slightly increase performance in some cases.

output_ts_offset OFFSET (output)
     Set the output time offset.

     OFFSET must be a time duration specification, see 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 OFFSET. Default value is 0 (meaning that no offset is applied).

format_whitelist LIST (input)
     "," separated List of allowed demuxers. By default all are allowed.

dump_separator STRING (input)
     Separator used to separate the fields printed on the command line about the Stream parameters. For example to separate the fields with newlines and indention:

          ffprobe -dump_separator "
                                    "  -i ~/videos/matrixbench_mpeg2.mpg

Format stream specifiers
========================

Format stream specifiers allow selection of one or more streams that match specific properties.

Possible forms of stream specifiers are:

STREAM_INDEX
     Matches the stream with this index.

STREAM_TYPE[:STREAM_INDEX]
     STREAM_TYPE is one of following: 'v' for video, 'a' for audio, 's' for subtitle, 'd' for data, and 't' for attachments. If STREAM_INDEX is given, then it matches the stream number STREAM_INDEX of this type. Otherwise, it matches all streams of this type.

p:PROGRAM_ID[:STREAM_INDEX]
     If STREAM_INDEX is given, then it matches the stream with number STREAM_INDEX in the program with the id PROGRAM_ID. Otherwise, it matches all streams in the program.

#STREAM_ID
     Matches the stream by a format-specific ID.

The exact semantics of stream specifiers is defined by the avformat_match_stream_specifier() function declared in the libavformat/avformat.h header.

     [file demuxers.texi not included]
     [file muxers.texi not included]
     [file metadata.texi not included]