Imported Debian version 2.4.3~trusty1
[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
58@end table
59
60@item seek2any @var{integer} (@emph{input})
61Allow seeking to non-keyframes on demuxer level when supported if set to 1.
62Default is 0.
63
64@item analyzeduration @var{integer} (@emph{input})
65Specify how many microseconds are analyzed to probe the input. A
66higher value will allow to detect more accurate information, but will
67increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
68
69@item cryptokey @var{hexadecimal string} (@emph{input})
70Set decryption key.
71
72@item indexmem @var{integer} (@emph{input})
73Set max memory used for timestamp index (per stream).
74
75@item rtbufsize @var{integer} (@emph{input})
76Set max memory used for buffering real-time frames.
77
78@item fdebug @var{flags} (@emph{input/output})
79Print specific debug info.
80
81Possible values:
82@table @samp
83@item ts
84@end table
85
86@item max_delay @var{integer} (@emph{input/output})
87Set maximum muxing or demuxing delay in microseconds.
88
89@item fpsprobesize @var{integer} (@emph{input})
90Set number of frames used to probe fps.
91
92@item audio_preload @var{integer} (@emph{output})
93Set microseconds by which audio packets should be interleaved earlier.
94
95@item chunk_duration @var{integer} (@emph{output})
96Set microseconds for each chunk.
97
98@item chunk_size @var{integer} (@emph{output})
99Set size in bytes for each chunk.
100
101@item err_detect, f_err_detect @var{flags} (@emph{input})
102Set error detection flags. @code{f_err_detect} is deprecated and
103should be used only via the @command{ffmpeg} tool.
104
105Possible values:
106@table @samp
107@item crccheck
108Verify embedded CRCs.
109@item bitstream
110Detect bitstream specification deviations.
111@item buffer
112Detect improper bitstream length.
113@item explode
114Abort decoding on minor error detection.
115@item careful
116Consider things that violate the spec and have not been seen in the
117wild as errors.
118@item compliant
119Consider all spec non compliancies as errors.
120@item aggressive
121Consider things that a sane encoder should not do as an error.
122@end table
123
124@item use_wallclock_as_timestamps @var{integer} (@emph{input})
125Use wallclock as timestamps.
126
127@item avoid_negative_ts @var{integer} (@emph{output})
128
129Possible values:
130@table @samp
131@item make_non_negative
132Shift timestamps to make them non-negative.
133Also note that this affects only leading negative timestamps, and not
134non-monotonic negative timestamps.
135@item make_zero
136Shift timestamps so that the first timestamp is 0.
137@item auto (default)
138Enables shifting when required by the target format.
139@item disabled
140Disables shifting of timestamp.
141@end table
142
143When shifting is enabled, all output timestamps are shifted by the
144same amount. Audio, video, and subtitles desynching and relative
145timestamp differences are preserved compared to how they would have
146been without shifting.
147
148@item skip_initial_bytes @var{integer} (@emph{input})
149Set number of bytes to skip before reading header and frames if set to 1.
150Default is 0.
151
152@item correct_ts_overflow @var{integer} (@emph{input})
153Correct single timestamp overflows if set to 1. Default is 1.
154
155@item flush_packets @var{integer} (@emph{output})
156Flush the underlying I/O stream after each packet. Default 1 enables it, and
157has the effect of reducing the latency; 0 disables it and may slightly
158increase performance in some cases.
159
160@item output_ts_offset @var{offset} (@emph{output})
161Set the output time offset.
162
163@var{offset} must be a time duration specification,
164see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
165
166The offset is added by the muxer to the output timestamps.
167
168Specifying a positive offset means that the corresponding streams are
169delayed bt the time duration specified in @var{offset}. Default value
170is @code{0} (meaning that no offset is applied).
171@end table
172
173@c man end FORMAT OPTIONS
174
175@anchor{Format stream specifiers}
176@section Format stream specifiers
177
178Format stream specifiers allow selection of one or more streams that
179match specific properties.
180
181Possible forms of stream specifiers are:
182@table @option
183@item @var{stream_index}
184Matches the stream with this index.
185
186@item @var{stream_type}[:@var{stream_index}]
187@var{stream_type} is one of following: 'v' for video, 'a' for audio,
188's' for subtitle, 'd' for data, and 't' for attachments. If
189@var{stream_index} is given, then it matches the stream number
190@var{stream_index} of this type. Otherwise, it matches all streams of
191this type.
192
193@item p:@var{program_id}[:@var{stream_index}]
194If @var{stream_index} is given, then it matches the stream with number
195@var{stream_index} in the program with the id
196@var{program_id}. Otherwise, it matches all streams in the program.
197
198@item #@var{stream_id}
199Matches the stream by a format-specific ID.
200@end table
201
202The exact semantics of stream specifiers is defined by the
203@code{avformat_match_stream_specifier()} function declared in the
204@file{libavformat/avformat.h} header.
205
206@ifclear config-writeonly
207@include demuxers.texi
208@end ifclear
209@ifclear config-readonly
210@include muxers.texi
211@end ifclear
212@include metadata.texi