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