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