1 @chapter Format Options
2 @c man begin FORMAT OPTIONS
4 The libavformat library provides some generic global options, which
5 can be set on all the muxers and demuxers. In addition each muxer or
6 demuxer may support so-called private options, which are specific for
9 Options may be set by specifying -@var{option} @var{value} in the
10 FFmpeg tools, or by setting the value explicitly in the
11 @code{AVFormatContext} options or using the @file{libavutil/opt.h} API
14 The list of supported options follows:
17 @item avioflags @var{flags} (@emph{input/output})
24 @item probesize @var{integer} (@emph{input})
25 Set probing size in bytes, i.e. the size of the data to analyze to get
26 stream information. A higher value will allow to detect more
27 information in case it is dispersed into the stream, but will increase
28 latency. Must be an integer not lesser than 32. It is 5000000 by default.
30 @item packetsize @var{integer} (@emph{output})
33 @item fflags @var{flags} (@emph{input/output})
43 Do not fill in missing values that can be exactly calculated.
45 Disable AVParsers, this needs @code{+nofillin} too.
49 Discard corrupted frames.
51 Try to interleave output packets by DTS.
53 Do not merge side data.
55 Enable RTP MP4A-LATM payload.
57 Reduce the latency introduced by optional buffering
60 @item seek2any @var{integer} (@emph{input})
61 Allow seeking to non-keyframes on demuxer level when supported if set to 1.
64 @item analyzeduration @var{integer} (@emph{input})
65 Specify how many microseconds are analyzed to probe the input. A
66 higher value will allow to detect more accurate information, but will
67 increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
69 @item cryptokey @var{hexadecimal string} (@emph{input})
72 @item indexmem @var{integer} (@emph{input})
73 Set max memory used for timestamp index (per stream).
75 @item rtbufsize @var{integer} (@emph{input})
76 Set max memory used for buffering real-time frames.
78 @item fdebug @var{flags} (@emph{input/output})
79 Print specific debug info.
86 @item max_delay @var{integer} (@emph{input/output})
87 Set maximum muxing or demuxing delay in microseconds.
89 @item fpsprobesize @var{integer} (@emph{input})
90 Set number of frames used to probe fps.
92 @item audio_preload @var{integer} (@emph{output})
93 Set microseconds by which audio packets should be interleaved earlier.
95 @item chunk_duration @var{integer} (@emph{output})
96 Set microseconds for each chunk.
98 @item chunk_size @var{integer} (@emph{output})
99 Set size in bytes for each chunk.
101 @item err_detect, f_err_detect @var{flags} (@emph{input})
102 Set error detection flags. @code{f_err_detect} is deprecated and
103 should be used only via the @command{ffmpeg} tool.
108 Verify embedded CRCs.
110 Detect bitstream specification deviations.
112 Detect improper bitstream length.
114 Abort decoding on minor error detection.
116 Consider things that violate the spec and have not been seen in the
119 Consider all spec non compliancies as errors.
121 Consider things that a sane encoder should not do as an error.
124 @item use_wallclock_as_timestamps @var{integer} (@emph{input})
125 Use wallclock as timestamps.
127 @item avoid_negative_ts @var{integer} (@emph{output})
128 Shift timestamps to make them non-negative. A value of 1 enables shifting,
129 a value of 0 disables it, the default value of -1 enables shifting
130 when required by the target format.
132 When shifting is enabled, all output timestamps are shifted by the
133 same amount. Audio, video, and subtitles desynching and relative
134 timestamp differences are preserved compared to how they would have
135 been without shifting.
137 Also note that this affects only leading negative timestamps, and not
138 non-monotonic negative timestamps.
140 @item skip_initial_bytes @var{integer} (@emph{input})
141 Set number of bytes to skip before reading header and frames if set to 1.
144 @item correct_ts_overflow @var{integer} (@emph{input})
145 Correct single timestamp overflows if set to 1. Default is 1.
147 @item flush_packets @var{integer} (@emph{output})
148 Flush the underlying I/O stream after each packet. Default 1 enables it, and
149 has the effect of reducing the latency; 0 disables it and may slightly
150 increase performance in some cases.
153 @c man end FORMAT OPTIONS
155 @anchor{Format stream specifiers}
156 @section Format stream specifiers
158 Format stream specifiers allow selection of one or more streams that
159 match specific properties.
161 Possible forms of stream specifiers are:
163 @item @var{stream_index}
164 Matches the stream with this index.
166 @item @var{stream_type}[:@var{stream_index}]
167 @var{stream_type} is one of following: 'v' for video, 'a' for audio,
168 's' for subtitle, 'd' for data, and 't' for attachments. If
169 @var{stream_index} is given, then it matches the stream number
170 @var{stream_index} of this type. Otherwise, it matches all streams of
173 @item p:@var{program_id}[:@var{stream_index}]
174 If @var{stream_index} is given, then it matches the stream with number
175 @var{stream_index} in the program with the id
176 @var{program_id}. Otherwise, it matches all streams in the program.
178 @item #@var{stream_id}
179 Matches the stream by a format-specific ID.
182 The exact semantics of stream specifiers is defined by the
183 @code{avformat_match_stream_specifier()} function declared in the
184 @file{libavformat/avformat.h} header.
186 @include demuxers.texi
188 @include metadata.texi