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