]> git.sesse.net Git - ffmpeg/blob - doc/formats.texi
doc/formats: document libavformats bitexact flag
[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 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.
29
30 @item packetsize @var{integer} (@emph{output})
31 Set packet size.
32
33 @item fflags @var{flags} (@emph{input/output})
34 Set format flags.
35
36 Possible values:
37 @table @samp
38 @item ignidx
39 Ignore index.
40 @item genpts
41 Generate PTS.
42 @item nofillin
43 Do not fill in missing values that can be exactly calculated.
44 @item noparse
45 Disable AVParsers, this needs @code{+nofillin} too.
46 @item igndts
47 Ignore DTS.
48 @item discardcorrupt
49 Discard corrupted frames.
50 @item sortdts
51 Try to interleave output packets by DTS.
52 @item keepside
53 Do not merge side data.
54 @item latm
55 Enable RTP MP4A-LATM payload.
56 @item nobuffer
57 Reduce the latency introduced by optional buffering
58 @item bitexact
59 Only write binary portable, build and time independant data.
60 @end table
61
62 @item seek2any @var{integer} (@emph{input})
63 Allow seeking to non-keyframes on demuxer level when supported if set to 1.
64 Default is 0.
65
66 @item analyzeduration @var{integer} (@emph{input})
67 Specify how many microseconds are analyzed to probe the input. A
68 higher value will allow to detect more accurate information, but will
69 increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
70
71 @item cryptokey @var{hexadecimal string} (@emph{input})
72 Set decryption key.
73
74 @item indexmem @var{integer} (@emph{input})
75 Set max memory used for timestamp index (per stream).
76
77 @item rtbufsize @var{integer} (@emph{input})
78 Set max memory used for buffering real-time frames.
79
80 @item fdebug @var{flags} (@emph{input/output})
81 Print specific debug info.
82
83 Possible values:
84 @table @samp
85 @item ts
86 @end table
87
88 @item max_delay @var{integer} (@emph{input/output})
89 Set maximum muxing or demuxing delay in microseconds.
90
91 @item fpsprobesize @var{integer} (@emph{input})
92 Set number of frames used to probe fps.
93
94 @item audio_preload @var{integer} (@emph{output})
95 Set microseconds by which audio packets should be interleaved earlier.
96
97 @item chunk_duration @var{integer} (@emph{output})
98 Set microseconds for each chunk.
99
100 @item chunk_size @var{integer} (@emph{output})
101 Set size in bytes for each chunk.
102
103 @item err_detect, f_err_detect @var{flags} (@emph{input})
104 Set error detection flags. @code{f_err_detect} is deprecated and
105 should be used only via the @command{ffmpeg} tool.
106
107 Possible values:
108 @table @samp
109 @item crccheck
110 Verify embedded CRCs.
111 @item bitstream
112 Detect bitstream specification deviations.
113 @item buffer
114 Detect improper bitstream length.
115 @item explode
116 Abort decoding on minor error detection.
117 @item careful
118 Consider things that violate the spec and have not been seen in the
119 wild as errors.
120 @item compliant
121 Consider all spec non compliancies as errors.
122 @item aggressive
123 Consider things that a sane encoder should not do as an error.
124 @end table
125
126 @item use_wallclock_as_timestamps @var{integer} (@emph{input})
127 Use wallclock as timestamps.
128
129 @item avoid_negative_ts @var{integer} (@emph{output})
130
131 Possible values:
132 @table @samp
133 @item make_non_negative
134 Shift timestamps to make them non-negative.
135 Also note that this affects only leading negative timestamps, and not
136 non-monotonic negative timestamps.
137 @item make_zero
138 Shift timestamps so that the first timestamp is 0.
139 @item auto (default)
140 Enables shifting when required by the target format.
141 @item disabled
142 Disables shifting of timestamp.
143 @end table
144
145 When shifting is enabled, all output timestamps are shifted by the
146 same amount. Audio, video, and subtitles desynching and relative
147 timestamp differences are preserved compared to how they would have
148 been without shifting.
149
150 @item skip_initial_bytes @var{integer} (@emph{input})
151 Set number of bytes to skip before reading header and frames if set to 1.
152 Default is 0.
153
154 @item correct_ts_overflow @var{integer} (@emph{input})
155 Correct single timestamp overflows if set to 1. Default is 1.
156
157 @item flush_packets @var{integer} (@emph{output})
158 Flush the underlying I/O stream after each packet. Default 1 enables it, and
159 has the effect of reducing the latency; 0 disables it and may slightly
160 increase performance in some cases.
161
162 @item output_ts_offset @var{offset} (@emph{output})
163 Set the output time offset.
164
165 @var{offset} must be a time duration specification,
166 see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
167
168 The offset is added by the muxer to the output timestamps.
169
170 Specifying a positive offset means that the corresponding streams are
171 delayed bt the time duration specified in @var{offset}. Default value
172 is @code{0} (meaning that no offset is applied).
173
174 @item format_whitelist @var{list} (@emph{input})
175 "," separated List of allowed demuxers. By default all are allowed.
176
177 @item dump_separator @var{string} (@emph{input})
178 Separator used to separate the fields printed on the command line about the
179 Stream parameters.
180 For example to separate the fields with newlines and indention:
181 @example
182 ffprobe -dump_separator "
183                           "  -i ~/videos/matrixbench_mpeg2.mpg
184 @end example
185 @end table
186
187 @c man end FORMAT OPTIONS
188
189 @anchor{Format stream specifiers}
190 @section Format stream specifiers
191
192 Format stream specifiers allow selection of one or more streams that
193 match specific properties.
194
195 Possible forms of stream specifiers are:
196 @table @option
197 @item @var{stream_index}
198 Matches the stream with this index.
199
200 @item @var{stream_type}[:@var{stream_index}]
201 @var{stream_type} is one of following: 'v' for video, 'a' for audio,
202 's' for subtitle, 'd' for data, and 't' for attachments. If
203 @var{stream_index} is given, then it matches the stream number
204 @var{stream_index} of this type. Otherwise, it matches all streams of
205 this type.
206
207 @item p:@var{program_id}[:@var{stream_index}]
208 If @var{stream_index} is given, then it matches the stream with number
209 @var{stream_index} in the program with the id
210 @var{program_id}. Otherwise, it matches all streams in the program.
211
212 @item #@var{stream_id}
213 Matches the stream by a format-specific ID.
214 @end table
215
216 The exact semantics of stream specifiers is defined by the
217 @code{avformat_match_stream_specifier()} function declared in the
218 @file{libavformat/avformat.h} header.
219
220 @ifclear config-writeonly
221 @include demuxers.texi
222 @end ifclear
223 @ifclear config-readonly
224 @include muxers.texi
225 @end ifclear
226 @include metadata.texi