]> git.sesse.net Git - ffmpeg/blob - doc/decoders.texi
lavfi/vulkan: allow calling glslang_uninit without a prior init
[ffmpeg] / doc / decoders.texi
1 @chapter Decoders
2 @c man begin DECODERS
3
4 Decoders are configured elements in FFmpeg which allow the decoding of
5 multimedia streams.
6
7 When you configure your FFmpeg build, all the supported native decoders
8 are enabled by default. Decoders requiring an external library must be enabled
9 manually via the corresponding @code{--enable-lib} option. You can list all
10 available decoders using the configure option @code{--list-decoders}.
11
12 You can disable all the decoders with the configure option
13 @code{--disable-decoders} and selectively enable / disable single decoders
14 with the options @code{--enable-decoder=@var{DECODER}} /
15 @code{--disable-decoder=@var{DECODER}}.
16
17 The option @code{-decoders} of the ff* tools will display the list of
18 enabled decoders.
19
20 @c man end DECODERS
21
22 @chapter Video Decoders
23 @c man begin VIDEO DECODERS
24
25 A description of some of the currently available video decoders
26 follows.
27
28 @section rawvideo
29
30 Raw video decoder.
31
32 This decoder decodes rawvideo streams.
33
34 @subsection Options
35
36 @table @option
37 @item top @var{top_field_first}
38 Specify the assumed field type of the input video.
39 @table @option
40 @item -1
41 the video is assumed to be progressive (default)
42 @item 0
43 bottom-field-first is assumed
44 @item 1
45 top-field-first is assumed
46 @end table
47
48 @end table
49
50 @section libdav1d
51
52 dav1d AV1 decoder.
53
54 libdav1d allows libavcodec to decode the AOMedia Video 1 (AV1) codec.
55 Requires the presence of the libdav1d headers and library during configuration.
56 You need to explicitly configure the build with @code{--enable-libdav1d}.
57
58 @subsection Options
59
60 The following options are supported by the libdav1d wrapper.
61
62 @table @option
63
64 @item framethreads
65 Set amount of frame threads to use during decoding. The default value is 0 (autodetect).
66
67 @item tilethreads
68 Set amount of tile threads to use during decoding. The default value is 0 (autodetect).
69
70 @item filmgrain
71 Apply film grain to the decoded video if present in the bitstream. Defaults to the
72 internal default of the library.
73
74 @item oppoint
75 Select an operating point of a scalable AV1 bitstream (0 - 31). Defaults to the
76 internal default of the library.
77
78 @item alllayers
79 Output all spatial layers of a scalable AV1 bitstream. The default value is false.
80
81 @end table
82
83 @section libdavs2
84
85 AVS2-P2/IEEE1857.4 video decoder wrapper.
86
87 This decoder allows libavcodec to decode AVS2 streams with davs2 library.
88
89 @c man end VIDEO DECODERS
90
91 @section libuavs3d
92
93 AVS3-P2/IEEE1857.10 video decoder.
94
95 libuavs3d allows libavcodec to decode AVS3 streams.
96 Requires the presence of the libuavs3d headers and library during configuration.
97 You need to explicitly configure the build with @code{--enable-libuavs3d}.
98
99 @subsection Options
100
101 The following option is supported by the libuavs3d wrapper.
102
103 @table @option
104
105 @item frame_threads
106 Set amount of frame threads to use during decoding. The default value is 0 (autodetect).
107
108 @end table
109
110 @c man end VIDEO DECODERS
111
112 @chapter Audio Decoders
113 @c man begin AUDIO DECODERS
114
115 A description of some of the currently available audio decoders
116 follows.
117
118 @section ac3
119
120 AC-3 audio decoder.
121
122 This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as well as
123 the undocumented RealAudio 3 (a.k.a. dnet).
124
125 @subsection AC-3 Decoder Options
126
127 @table @option
128
129 @item -drc_scale @var{value}
130 Dynamic Range Scale Factor. The factor to apply to dynamic range values
131 from the AC-3 stream. This factor is applied exponentially. The default value is 1.
132 There are 3 notable scale factor ranges:
133 @table @option
134 @item drc_scale == 0
135 DRC disabled. Produces full range audio.
136 @item 0 < drc_scale <= 1
137 DRC enabled.  Applies a fraction of the stream DRC value.
138 Audio reproduction is between full range and full compression.
139 @item drc_scale > 1
140 DRC enabled. Applies drc_scale asymmetrically.
141 Loud sounds are fully compressed.  Soft sounds are enhanced.
142 @end table
143
144 @end table
145
146 @section flac
147
148 FLAC audio decoder.
149
150 This decoder aims to implement the complete FLAC specification from Xiph.
151
152 @subsection FLAC Decoder options
153
154 @table @option
155
156 @item -use_buggy_lpc
157 The lavc FLAC encoder used to produce buggy streams with high lpc values
158 (like the default value). This option makes it possible to decode such streams
159 correctly by using lavc's old buggy lpc logic for decoding.
160
161 @end table
162
163 @section ffwavesynth
164
165 Internal wave synthesizer.
166
167 This decoder generates wave patterns according to predefined sequences. Its
168 use is purely internal and the format of the data it accepts is not publicly
169 documented.
170
171 @section libcelt
172
173 libcelt decoder wrapper.
174
175 libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
176 Requires the presence of the libcelt headers and library during configuration.
177 You need to explicitly configure the build with @code{--enable-libcelt}.
178
179 @section libgsm
180
181 libgsm decoder wrapper.
182
183 libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
184 the presence of the libgsm headers and library during configuration. You need
185 to explicitly configure the build with @code{--enable-libgsm}.
186
187 This decoder supports both the ordinary GSM and the Microsoft variant.
188
189 @section libilbc
190
191 libilbc decoder wrapper.
192
193 libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
194 audio codec. Requires the presence of the libilbc headers and library during
195 configuration. You need to explicitly configure the build with
196 @code{--enable-libilbc}.
197
198 @subsection Options
199
200 The following option is supported by the libilbc wrapper.
201
202 @table @option
203 @item enhance
204
205 Enable the enhancement of the decoded audio when set to 1. The default
206 value is 0 (disabled).
207
208 @end table
209
210 @section libopencore-amrnb
211
212 libopencore-amrnb decoder wrapper.
213
214 libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
215 Narrowband audio codec. Using it requires the presence of the
216 libopencore-amrnb headers and library during configuration. You need to
217 explicitly configure the build with @code{--enable-libopencore-amrnb}.
218
219 An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
220 without this library.
221
222 @section libopencore-amrwb
223
224 libopencore-amrwb decoder wrapper.
225
226 libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
227 Wideband audio codec. Using it requires the presence of the
228 libopencore-amrwb headers and library during configuration. You need to
229 explicitly configure the build with @code{--enable-libopencore-amrwb}.
230
231 An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
232 without this library.
233
234 @section libopus
235
236 libopus decoder wrapper.
237
238 libopus allows libavcodec to decode the Opus Interactive Audio Codec.
239 Requires the presence of the libopus headers and library during
240 configuration. You need to explicitly configure the build with
241 @code{--enable-libopus}.
242
243 An FFmpeg native decoder for Opus exists, so users can decode Opus
244 without this library.
245
246 @c man end AUDIO DECODERS
247
248 @chapter Subtitles Decoders
249 @c man begin SUBTILES DECODERS
250
251 @section libaribb24
252
253 ARIB STD-B24 caption decoder.
254
255 Implements profiles A and C of the ARIB STD-B24 standard.
256
257 @subsection libaribb24 Decoder Options
258
259 @table @option
260
261 @item -aribb24-base-path @var{path}
262 Sets the base path for the libaribb24 library. This is utilized for reading of
263 configuration files (for custom unicode conversions), and for dumping of
264 non-text symbols as images under that location.
265
266 Unset by default.
267
268 @item -aribb24-skip-ruby-text @var{boolean}
269 Tells the decoder wrapper to skip text blocks that contain half-height ruby
270 text.
271
272 Enabled by default.
273
274 @end table
275
276 @section dvbsub
277
278 @subsection Options
279
280 @table @option
281 @item compute_clut
282 @table @option
283 @item -1
284 Compute clut if no matching CLUT is in the stream.
285 @item 0
286 Never compute CLUT
287 @item 1
288 Always compute CLUT and override the one provided in the stream.
289 @end table
290 @item dvb_substream
291 Selects the dvb substream, or all substreams if -1 which is default.
292
293 @end table
294
295 @section dvdsub
296
297 This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
298 also be found in VobSub file pairs and in some Matroska files.
299
300 @subsection Options
301
302 @table @option
303 @item palette
304 Specify the global palette used by the bitmaps. When stored in VobSub, the
305 palette is normally specified in the index file; in Matroska, the palette is
306 stored in the codec extra-data in the same format as in VobSub. In DVDs, the
307 palette is stored in the IFO file, and therefore not available when reading
308 from dumped VOB files.
309
310 The format for this option is a string containing 16 24-bits hexadecimal
311 numbers (without 0x prefix) separated by commas, for example @code{0d00ee,
312 ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
313 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
314
315 @item ifo_palette
316 Specify the IFO file from which the global palette is obtained.
317 (experimental)
318
319 @item forced_subs_only
320 Only decode subtitle entries marked as forced. Some titles have forced
321 and non-forced subtitles in the same track. Setting this flag to @code{1}
322 will only keep the forced subtitles. Default value is @code{0}.
323 @end table
324
325 @section libzvbi-teletext
326
327 Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
328 subtitles. Requires the presence of the libzvbi headers and library during
329 configuration. You need to explicitly configure the build with
330 @code{--enable-libzvbi}.
331
332 @subsection Options
333
334 @table @option
335 @item txt_page
336 List of teletext page numbers to decode. Pages that do not match the specified
337 list are dropped. You may use the special @code{*} string to match all pages,
338 or @code{subtitle} to match all subtitle pages.
339 Default value is *.
340 @item txt_default_region
341 Set default character set used for decoding, a value between 0 and 87 (see
342 ETS 300 706, Section 15, Table 32). Default value is -1, which does not
343 override the libzvbi default. This option is needed for some legacy level 1.0
344 transmissions which cannot signal the proper charset.
345 @item txt_chop_top
346 Discards the top teletext line. Default value is 1.
347 @item txt_format
348 Specifies the format of the decoded subtitles.
349 @table @option
350 @item bitmap
351 The default format, you should use this for teletext pages, because certain
352 graphics and colors cannot be expressed in simple text or even ASS.
353 @item text
354 Simple text based output without formatting.
355 @item ass
356 Formatted ASS output, subtitle pages and teletext pages are returned in
357 different styles, subtitle pages are stripped down to text, but an effort is
358 made to keep the text alignment and the formatting.
359 @end table
360 @item txt_left
361 X offset of generated bitmaps, default is 0.
362 @item txt_top
363 Y offset of generated bitmaps, default is 0.
364 @item txt_chop_spaces
365 Chops leading and trailing spaces and removes empty lines from the generated
366 text. This option is useful for teletext based subtitles where empty spaces may
367 be present at the start or at the end of the lines or empty lines may be
368 present between the subtitle lines because of double-sized teletext characters.
369 Default value is 1.
370 @item txt_duration
371 Sets the display duration of the decoded teletext pages or subtitles in
372 milliseconds. Default value is -1 which means infinity or until the next
373 subtitle event comes.
374 @item txt_transparent
375 Force transparent background of the generated teletext bitmaps. Default value
376 is 0 which means an opaque background.
377 @item txt_opacity
378 Sets the opacity (0-255) of the teletext background. If
379 @option{txt_transparent} is not set, it only affects characters between a start
380 box and an end box, typically subtitles. Default value is 0 if
381 @option{txt_transparent} is set, 255 otherwise.
382
383 @end table
384
385 @c man end SUBTILES DECODERS