• 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).
79This option is deprecated for libdav1d >= 1.0 and will be removed in the future. Use the
80global option @code{threads} instead.
81
82@item tilethreads
83Set amount of tile threads to use during decoding. The default value is 0 (autodetect).
84This option is deprecated for libdav1d >= 1.0 and will be removed in the future. Use the
85global option @code{threads} instead.
86
87@item filmgrain
88Apply film grain to the decoded video if present in the bitstream. Defaults to the
89internal default of the library.
90This option is deprecated and will be removed in the future. See the global option
91@code{export_side_data} to export Film Grain parameters instead of applying it.
92
93@item oppoint
94Select an operating point of a scalable AV1 bitstream (0 - 31). Defaults to the
95internal default of the library.
96
97@item alllayers
98Output all spatial layers of a scalable AV1 bitstream. The default value is false.
99
100@end table
101
102@section libdavs2
103
104AVS2-P2/IEEE1857.4 video decoder wrapper.
105
106This decoder allows libavcodec to decode AVS2 streams with davs2 library.
107
108@c man end VIDEO DECODERS
109
110@section libuavs3d
111
112AVS3-P2/IEEE1857.10 video decoder.
113
114libuavs3d allows libavcodec to decode AVS3 streams.
115Requires the presence of the libuavs3d headers and library during configuration.
116You need to explicitly configure the build with @code{--enable-libuavs3d}.
117
118@subsection Options
119
120The following option is supported by the libuavs3d wrapper.
121
122@table @option
123
124@item frame_threads
125Set amount of frame threads to use during decoding. The default value is 0 (autodetect).
126
127@end table
128
129@section QSV Decoders
130
131The family of Intel QuickSync Video decoders (VC1, MPEG-2, H.264, HEVC,
132JPEG/MJPEG, VP8, VP9, AV1).
133
134@subsection Common Options
135
136The following options are supported by all qsv decoders.
137
138@table @option
139
140@item @var{async_depth}
141Internal parallelization depth, the higher the value the higher the latency.
142
143@item @var{gpu_copy}
144A GPU-accelerated copy between video and system memory
145@table @samp
146@item default
147@item on
148@item off
149@end table
150
151@end table
152
153@subsection HEVC Options
154Extra options for hevc_qsv.
155
156@table @option
157
158@item @var{load_plugin}
159A user plugin to load in an internal session
160@table @samp
161@item none
162@item hevc_sw
163@item hevc_hw
164@end table
165
166@item @var{load_plugins}
167A :-separate list of hexadecimal plugin UIDs to load in an internal session
168
169@end table
170
171@section v210
172
173Uncompressed 4:2:2 10-bit decoder.
174
175@subsection Options
176
177@table @option
178
179@item custom_stride
180Set the line size of the v210 data in bytes. The default value is 0
181(autodetect). You can use the special -1 value for a strideless v210 as seen in
182BOXX files.
183
184@end table
185
186@c man end VIDEO DECODERS
187
188@chapter Audio Decoders
189@c man begin AUDIO DECODERS
190
191A description of some of the currently available audio decoders
192follows.
193
194@section ac3
195
196AC-3 audio decoder.
197
198This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as well as
199the undocumented RealAudio 3 (a.k.a. dnet).
200
201@subsection AC-3 Decoder Options
202
203@table @option
204
205@item -drc_scale @var{value}
206Dynamic Range Scale Factor. The factor to apply to dynamic range values
207from the AC-3 stream. This factor is applied exponentially. The default value is 1.
208There are 3 notable scale factor ranges:
209@table @option
210@item drc_scale == 0
211DRC disabled. Produces full range audio.
212@item 0 < drc_scale <= 1
213DRC enabled.  Applies a fraction of the stream DRC value.
214Audio reproduction is between full range and full compression.
215@item drc_scale > 1
216DRC enabled. Applies drc_scale asymmetrically.
217Loud sounds are fully compressed.  Soft sounds are enhanced.
218@end table
219
220@end table
221
222@section flac
223
224FLAC audio decoder.
225
226This decoder aims to implement the complete FLAC specification from Xiph.
227
228@subsection FLAC Decoder options
229
230@table @option
231
232@item -use_buggy_lpc
233The lavc FLAC encoder used to produce buggy streams with high lpc values
234(like the default value). This option makes it possible to decode such streams
235correctly by using lavc's old buggy lpc logic for decoding.
236
237@end table
238
239@section ffwavesynth
240
241Internal wave synthesizer.
242
243This decoder generates wave patterns according to predefined sequences. Its
244use is purely internal and the format of the data it accepts is not publicly
245documented.
246
247@section libcelt
248
249libcelt decoder wrapper.
250
251libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
252Requires the presence of the libcelt headers and library during configuration.
253You need to explicitly configure the build with @code{--enable-libcelt}.
254
255@section libgsm
256
257libgsm decoder wrapper.
258
259libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
260the presence of the libgsm headers and library during configuration. You need
261to explicitly configure the build with @code{--enable-libgsm}.
262
263This decoder supports both the ordinary GSM and the Microsoft variant.
264
265@section libilbc
266
267libilbc decoder wrapper.
268
269libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
270audio codec. Requires the presence of the libilbc headers and library during
271configuration. You need to explicitly configure the build with
272@code{--enable-libilbc}.
273
274@subsection Options
275
276The following option is supported by the libilbc wrapper.
277
278@table @option
279@item enhance
280
281Enable the enhancement of the decoded audio when set to 1. The default
282value is 0 (disabled).
283
284@end table
285
286@section libopencore-amrnb
287
288libopencore-amrnb decoder wrapper.
289
290libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
291Narrowband audio codec. Using it requires the presence of the
292libopencore-amrnb headers and library during configuration. You need to
293explicitly configure the build with @code{--enable-libopencore-amrnb}.
294
295An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
296without this library.
297
298@section libopencore-amrwb
299
300libopencore-amrwb decoder wrapper.
301
302libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
303Wideband audio codec. Using it requires the presence of the
304libopencore-amrwb headers and library during configuration. You need to
305explicitly configure the build with @code{--enable-libopencore-amrwb}.
306
307An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
308without this library.
309
310@section libopus
311
312libopus decoder wrapper.
313
314libopus allows libavcodec to decode the Opus Interactive Audio Codec.
315Requires the presence of the libopus headers and library during
316configuration. You need to explicitly configure the build with
317@code{--enable-libopus}.
318
319An FFmpeg native decoder for Opus exists, so users can decode Opus
320without this library.
321
322@c man end AUDIO DECODERS
323
324@chapter Subtitles Decoders
325@c man begin SUBTILES DECODERS
326
327@section libaribb24
328
329ARIB STD-B24 caption decoder.
330
331Implements profiles A and C of the ARIB STD-B24 standard.
332
333@subsection libaribb24 Decoder Options
334
335@table @option
336
337@item -aribb24-base-path @var{path}
338Sets the base path for the libaribb24 library. This is utilized for reading of
339configuration files (for custom unicode conversions), and for dumping of
340non-text symbols as images under that location.
341
342Unset by default.
343
344@item -aribb24-skip-ruby-text @var{boolean}
345Tells the decoder wrapper to skip text blocks that contain half-height ruby
346text.
347
348Enabled by default.
349
350@end table
351
352@section dvbsub
353
354@subsection Options
355
356@table @option
357@item compute_clut
358@table @option
359@item -2
360Compute clut once if no matching CLUT is in the stream.
361@item -1
362Compute clut if no matching CLUT is in the stream.
363@item 0
364Never compute CLUT
365@item 1
366Always compute CLUT and override the one provided in the stream.
367@end table
368@item dvb_substream
369Selects the dvb substream, or all substreams if -1 which is default.
370
371@end table
372
373@section dvdsub
374
375This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
376also be found in VobSub file pairs and in some Matroska files.
377
378@subsection Options
379
380@table @option
381@item palette
382Specify the global palette used by the bitmaps. When stored in VobSub, the
383palette is normally specified in the index file; in Matroska, the palette is
384stored in the codec extra-data in the same format as in VobSub. In DVDs, the
385palette is stored in the IFO file, and therefore not available when reading
386from dumped VOB files.
387
388The format for this option is a string containing 16 24-bits hexadecimal
389numbers (without 0x prefix) separated by commas, for example @code{0d00ee,
390ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
3917b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
392
393@item ifo_palette
394Specify the IFO file from which the global palette is obtained.
395(experimental)
396
397@item forced_subs_only
398Only decode subtitle entries marked as forced. Some titles have forced
399and non-forced subtitles in the same track. Setting this flag to @code{1}
400will only keep the forced subtitles. Default value is @code{0}.
401@end table
402
403@section libzvbi-teletext
404
405Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
406subtitles. Requires the presence of the libzvbi headers and library during
407configuration. You need to explicitly configure the build with
408@code{--enable-libzvbi}.
409
410@subsection Options
411
412@table @option
413@item txt_page
414List of teletext page numbers to decode. Pages that do not match the specified
415list are dropped. You may use the special @code{*} string to match all pages,
416or @code{subtitle} to match all subtitle pages.
417Default value is *.
418@item txt_default_region
419Set default character set used for decoding, a value between 0 and 87 (see
420ETS 300 706, Section 15, Table 32). Default value is -1, which does not
421override the libzvbi default. This option is needed for some legacy level 1.0
422transmissions which cannot signal the proper charset.
423@item txt_chop_top
424Discards the top teletext line. Default value is 1.
425@item txt_format
426Specifies the format of the decoded subtitles.
427@table @option
428@item bitmap
429The default format, you should use this for teletext pages, because certain
430graphics and colors cannot be expressed in simple text or even ASS.
431@item text
432Simple text based output without formatting.
433@item ass
434Formatted ASS output, subtitle pages and teletext pages are returned in
435different styles, subtitle pages are stripped down to text, but an effort is
436made to keep the text alignment and the formatting.
437@end table
438@item txt_left
439X offset of generated bitmaps, default is 0.
440@item txt_top
441Y offset of generated bitmaps, default is 0.
442@item txt_chop_spaces
443Chops leading and trailing spaces and removes empty lines from the generated
444text. This option is useful for teletext based subtitles where empty spaces may
445be present at the start or at the end of the lines or empty lines may be
446present between the subtitle lines because of double-sized teletext characters.
447Default value is 1.
448@item txt_duration
449Sets the display duration of the decoded teletext pages or subtitles in
450milliseconds. Default value is -1 which means infinity or until the next
451subtitle event comes.
452@item txt_transparent
453Force transparent background of the generated teletext bitmaps. Default value
454is 0 which means an opaque background.
455@item txt_opacity
456Sets the opacity (0-255) of the teletext background. If
457@option{txt_transparent} is not set, it only affects characters between a start
458box and an end box, typically subtitles. Default value is 0 if
459@option{txt_transparent} is set, 255 otherwise.
460
461@end table
462
463@c man end SUBTILES DECODERS
464