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