]> git.sesse.net Git - ffmpeg/blob - doc/formats.texi
avformat/subtitles: add a next line jumper and use it.
[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 @end table
59
60 @item analyzeduration @var{integer} (@emph{input})
61 Specify how many microseconds are analyzed to probe the input. A
62 higher value will allow to detect more accurate information, but will
63 increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
64
65 @item cryptokey @var{hexadecimal string} (@emph{input})
66 Set decryption key.
67
68 @item indexmem @var{integer} (@emph{input})
69 Set max memory used for timestamp index (per stream).
70
71 @item rtbufsize @var{integer} (@emph{input})
72 Set max memory used for buffering real-time frames.
73
74 @item fdebug @var{flags} (@emph{input/output})
75 Print specific debug info.
76
77 Possible values:
78 @table @samp
79 @item ts
80 @end table
81
82 @item max_delay @var{integer} (@emph{input/output})
83 Set maximum muxing or demuxing delay in microseconds.
84
85 @item fpsprobesize @var{integer} (@emph{input})
86 Set number of frames used to probe fps.
87
88 @item audio_preload @var{integer} (@emph{output})
89 Set microseconds by which audio packets should be interleaved earlier.
90
91 @item chunk_duration @var{integer} (@emph{output})
92 Set microseconds for each chunk.
93
94 @item chunk_size @var{integer} (@emph{output})
95 Set size in bytes for each chunk.
96
97 @item err_detect, f_err_detect @var{flags} (@emph{input})
98 Set error detection flags. @code{f_err_detect} is deprecated and
99 should be used only via the @command{ffmpeg} tool.
100
101 Possible values:
102 @table @samp
103 @item crccheck
104 Verify embedded CRCs.
105 @item bitstream
106 Detect bitstream specification deviations.
107 @item buffer
108 Detect improper bitstream length.
109 @item explode
110 Abort decoding on minor error detection.
111 @item careful
112 Consider things that violate the spec and have not been seen in the
113 wild as errors.
114 @item compliant
115 Consider all spec non compliancies as errors.
116 @item aggressive
117 Consider things that a sane encoder should not do as an error.
118 @end table
119
120 @item use_wallclock_as_timestamps @var{integer} (@emph{input})
121 Use wallclock as timestamps.
122
123 @item avoid_negative_ts @var{integer} (@emph{output})
124 Shift timestamps to make them non-negative. A value of 1 enables shifting,
125 a value of 0 disables it, the default value of -1 enables shifting
126 when required by the target format.
127
128 When shifting is enabled, all output timestamps are shifted by the
129 same amount. Audio, video, and subtitles desynching and relative
130 timestamp differences are preserved compared to how they would have
131 been without shifting.
132
133 Also note that this affects only leading negative timestamps, and not
134 non-monotonic negative timestamps.
135
136 @item flush_packets @var{integer} (@emph{output})
137 Flush the underlying I/O stream after each packet. Default 1 enables it, and
138 has the effect of reducing the latency; 0 disables it and may slightly
139 increase performance in some cases.
140 @end table
141
142 @c man end FORMAT OPTIONS
143
144 @anchor{Format stream specifiers}
145 @section Format stream specifiers
146
147 Format stream specifiers allow selection of one or more streams that
148 match specific properties.
149
150 Possible forms of stream specifiers are:
151 @table @option
152 @item @var{stream_index}
153 Matches the stream with this index.
154
155 @item @var{stream_type}[:@var{stream_index}]
156 @var{stream_type} is one of following: 'v' for video, 'a' for audio,
157 's' for subtitle, 'd' for data, and 't' for attachments. If
158 @var{stream_index} is given, then it matches the stream number
159 @var{stream_index} of this type. Otherwise, it matches all streams of
160 this type.
161
162 @item p:@var{program_id}[:@var{stream_index}]
163 If @var{stream_index} is given, then it matches the stream with number
164 @var{stream_index} in the program with the id
165 @var{program_id}. Otherwise, it matches all streams in the program.
166
167 @item #@var{stream_id}
168 Matches the stream by a format-specific ID.
169 @end table
170
171 The exact semantics of stream specifiers is defined by the
172 @code{avformat_match_stream_specifier()} function declared in the
173 @file{libavformat/avformat.h} header.
174
175 @include demuxers.texi
176 @include muxers.texi
177 @include metadata.texi