]> git.sesse.net Git - ffmpeg/blob - doc/formats.texi
avformat: Remove remnants of side data merging
[ffmpeg] / doc / formats.texi
1 @chapter Format Options
2 @c man begin FORMAT OPTIONS
3
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
7 that component.
8
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
12 for programmatic use.
13
14 The list of supported options follows:
15
16 @table @option
17 @item avioflags @var{flags} (@emph{input/output})
18 Possible values:
19 @table @samp
20 @item direct
21 Reduce buffering.
22 @end table
23
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 enable detecting 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.
29
30 @item max_probe_packets @var{integer} (@emph{input})
31 Set the maximum number of buffered packets when probing a codec.
32 Default is 2500 packets.
33
34 @item packetsize @var{integer} (@emph{output})
35 Set packet size.
36
37 @item fflags @var{flags}
38 Set format flags. Some are implemented for a limited number of formats.
39
40 Possible values for input files:
41 @table @samp
42 @item discardcorrupt
43 Discard corrupted packets.
44 @item fastseek
45 Enable fast, but inaccurate seeks for some formats.
46 @item genpts
47 Generate missing PTS if DTS is present.
48 @item igndts
49 Ignore DTS if PTS is set. Inert when nofillin is set.
50 @item ignidx
51 Ignore index.
52 @item nobuffer
53 Reduce the latency introduced by buffering during initial input streams analysis.
54 @item nofillin
55 Do not fill in missing values in packet fields that can be exactly calculated.
56 @item noparse
57 Disable AVParsers, this needs @code{+nofillin} too.
58 @item sortdts
59 Try to interleave output packets by DTS. At present, available only for AVIs with an index.
60 @end table
61
62 Possible values for output files:
63 @table @samp
64 @item autobsf
65 Automatically apply bitstream filters as required by the output format. Enabled by default.
66 @item bitexact
67 Only write platform-, build- and time-independent data.
68 This ensures that file and data checksums are reproducible and match between
69 platforms. Its primary use is for regression testing.
70 @item flush_packets
71 Write out packets immediately.
72 @item latm (@emph{deprecated},@emph{inert})
73 @item shortest
74 Stop muxing at the end of the shortest stream.
75 It may be needed to increase max_interleave_delta to avoid flushing the longer
76 streams before EOF.
77 @end table
78
79 @item seek2any @var{integer} (@emph{input})
80 Allow seeking to non-keyframes on demuxer level when supported if set to 1.
81 Default is 0.
82
83 @item analyzeduration @var{integer} (@emph{input})
84 Specify how many microseconds are analyzed to probe the input. A
85 higher value will enable detecting more accurate information, but will
86 increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
87
88 @item cryptokey @var{hexadecimal string} (@emph{input})
89 Set decryption key.
90
91 @item indexmem @var{integer} (@emph{input})
92 Set max memory used for timestamp index (per stream).
93
94 @item rtbufsize @var{integer} (@emph{input})
95 Set max memory used for buffering real-time frames.
96
97 @item fdebug @var{flags} (@emph{input/output})
98 Print specific debug info.
99
100 Possible values:
101 @table @samp
102 @item ts
103 @end table
104
105 @item max_delay @var{integer} (@emph{input/output})
106 Set maximum muxing or demuxing delay in microseconds.
107
108 @item fpsprobesize @var{integer} (@emph{input})
109 Set number of frames used to probe fps.
110
111 @item audio_preload @var{integer} (@emph{output})
112 Set microseconds by which audio packets should be interleaved earlier.
113
114 @item chunk_duration @var{integer} (@emph{output})
115 Set microseconds for each chunk.
116
117 @item chunk_size @var{integer} (@emph{output})
118 Set size in bytes for each chunk.
119
120 @item err_detect, f_err_detect @var{flags} (@emph{input})
121 Set error detection flags. @code{f_err_detect} is deprecated and
122 should be used only via the @command{ffmpeg} tool.
123
124 Possible values:
125 @table @samp
126 @item crccheck
127 Verify embedded CRCs.
128 @item bitstream
129 Detect bitstream specification deviations.
130 @item buffer
131 Detect improper bitstream length.
132 @item explode
133 Abort decoding on minor error detection.
134 @item careful
135 Consider things that violate the spec and have not been seen in the
136 wild as errors.
137 @item compliant
138 Consider all spec non compliancies as errors.
139 @item aggressive
140 Consider things that a sane encoder should not do as an error.
141 @end table
142
143 @item max_interleave_delta @var{integer} (@emph{output})
144 Set maximum buffering duration for interleaving. The duration is
145 expressed in microseconds, and defaults to 10000000 (10 seconds).
146
147 To ensure all the streams are interleaved correctly, libavformat will
148 wait until it has at least one packet for each stream before actually
149 writing any packets to the output file. When some streams are
150 "sparse" (i.e. there are large gaps between successive packets), this
151 can result in excessive buffering.
152
153 This field specifies the maximum difference between the timestamps of the
154 first and the last packet in the muxing queue, above which libavformat
155 will output a packet regardless of whether it has queued a packet for all
156 the streams.
157
158 If set to 0, libavformat will continue buffering packets until it has
159 a packet for each stream, regardless of the maximum timestamp
160 difference between the buffered packets.
161
162 @item use_wallclock_as_timestamps @var{integer} (@emph{input})
163 Use wallclock as timestamps if set to 1. Default is 0.
164
165 @item avoid_negative_ts @var{integer} (@emph{output})
166
167 Possible values:
168 @table @samp
169 @item make_non_negative
170 Shift timestamps to make them non-negative.
171 Also note that this affects only leading negative timestamps, and not
172 non-monotonic negative timestamps.
173 @item make_zero
174 Shift timestamps so that the first timestamp is 0.
175 @item auto (default)
176 Enables shifting when required by the target format.
177 @item disabled
178 Disables shifting of timestamp.
179 @end table
180
181 When shifting is enabled, all output timestamps are shifted by the
182 same amount. Audio, video, and subtitles desynching and relative
183 timestamp differences are preserved compared to how they would have
184 been without shifting.
185
186 @item skip_initial_bytes @var{integer} (@emph{input})
187 Set number of bytes to skip before reading header and frames if set to 1.
188 Default is 0.
189
190 @item correct_ts_overflow @var{integer} (@emph{input})
191 Correct single timestamp overflows if set to 1. Default is 1.
192
193 @item flush_packets @var{integer} (@emph{output})
194 Flush the underlying I/O stream after each packet. Default is -1 (auto), which
195 means that the underlying protocol will decide, 1 enables it, and has the
196 effect of reducing the latency, 0 disables it and may increase IO throughput in
197 some cases.
198
199 @item output_ts_offset @var{offset} (@emph{output})
200 Set the output time offset.
201
202 @var{offset} must be a time duration specification,
203 see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
204
205 The offset is added by the muxer to the output timestamps.
206
207 Specifying a positive offset means that the corresponding streams are
208 delayed bt the time duration specified in @var{offset}. Default value
209 is @code{0} (meaning that no offset is applied).
210
211 @item format_whitelist @var{list} (@emph{input})
212 "," separated list of allowed demuxers. By default all are allowed.
213
214 @item dump_separator @var{string} (@emph{input})
215 Separator used to separate the fields printed on the command line about the
216 Stream parameters.
217 For example, to separate the fields with newlines and indentation:
218 @example
219 ffprobe -dump_separator "
220                           "  -i ~/videos/matrixbench_mpeg2.mpg
221 @end example
222
223 @item max_streams @var{integer} (@emph{input})
224 Specifies the maximum number of streams. This can be used to reject files that
225 would require too many resources due to a large number of streams.
226
227 @item skip_estimate_duration_from_pts @var{bool} (@emph{input})
228 Skip estimation of input duration when calculated using PTS.
229 At present, applicable for MPEG-PS and MPEG-TS.
230
231 @item strict, f_strict @var{integer} (@emph{input/output})
232 Specify how strictly to follow the standards. @code{f_strict} is deprecated and
233 should be used only via the @command{ffmpeg} tool.
234
235 Possible values:
236 @table @samp
237 @item very
238 strictly conform to an older more strict version of the spec or reference software
239 @item strict
240 strictly conform to all the things in the spec no matter what consequences
241 @item normal
242
243 @item unofficial
244 allow unofficial extensions
245 @item experimental
246 allow non standardized experimental things, experimental
247 (unfinished/work in progress/not well tested) decoders and encoders.
248 Note: experimental decoders can pose a security risk, do not use this for
249 decoding untrusted input.
250 @end table
251
252 @end table
253
254 @c man end FORMAT OPTIONS
255
256 @anchor{Format stream specifiers}
257 @section Format stream specifiers
258
259 Format stream specifiers allow selection of one or more streams that
260 match specific properties.
261
262 The exact semantics of stream specifiers is defined by the
263 @code{avformat_match_stream_specifier()} function declared in the
264 @file{libavformat/avformat.h} header and documented in the
265 @ref{Stream specifiers,,Stream specifiers section in the ffmpeg(1) manual,ffmpeg}.
266
267 @ifclear config-writeonly
268 @include demuxers.texi
269 @end ifclear
270 @ifclear config-readonly
271 @include muxers.texi
272 @end ifclear
273 @include metadata.texi