summaryrefslogtreecommitdiff
path: root/doc/decoders.texi (plain)
blob: babe1297672075d4eb5a2eb7690d54c718d30605
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 hevc
29
30HEVC / H.265 decoder.
31
32Note: the @option{skip_loop_filter} option has effect only at level
33@code{all}.
34
35@section rawvideo
36
37Raw video decoder.
38
39This decoder decodes rawvideo streams.
40
41@subsection Options
42
43@table @option
44@item top @var{top_field_first}
45Specify the assumed field type of the input video.
46@table @option
47@item -1
48the video is assumed to be progressive (default)
49@item 0
50bottom-field-first is assumed
51@item 1
52top-field-first is assumed
53@end table
54
55@end table
56
57@c man end VIDEO DECODERS
58
59@chapter Audio Decoders
60@c man begin AUDIO DECODERS
61
62A description of some of the currently available audio decoders
63follows.
64
65@section ac3
66
67AC-3 audio decoder.
68
69This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as well as
70the undocumented RealAudio 3 (a.k.a. dnet).
71
72@subsection AC-3 Decoder Options
73
74@table @option
75
76@item -drc_scale @var{value}
77Dynamic Range Scale Factor. The factor to apply to dynamic range values
78from the AC-3 stream. This factor is applied exponentially.
79There are 3 notable scale factor ranges:
80@table @option
81@item drc_scale == 0
82DRC disabled. Produces full range audio.
83@item 0 < drc_scale <= 1
84DRC enabled. Applies a fraction of the stream DRC value.
85Audio reproduction is between full range and full compression.
86@item drc_scale > 1
87DRC enabled. Applies drc_scale asymmetrically.
88Loud sounds are fully compressed. Soft sounds are enhanced.
89@end table
90
91@end table
92
93@section flac
94
95FLAC audio decoder.
96
97This decoder aims to implement the complete FLAC specification from Xiph.
98
99@subsection FLAC Decoder options
100
101@table @option
102
103@item -use_buggy_lpc
104The lavc FLAC encoder used to produce buggy streams with high lpc values
105(like the default value). This option makes it possible to decode such streams
106correctly by using lavc's old buggy lpc logic for decoding.
107
108@end table
109
110@section ffwavesynth
111
112Internal wave synthetizer.
113
114This decoder generates wave patterns according to predefined sequences. Its
115use is purely internal and the format of the data it accepts is not publicly
116documented.
117
118@section libcelt
119
120libcelt decoder wrapper.
121
122libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
123Requires the presence of the libcelt headers and library during configuration.
124You need to explicitly configure the build with @code{--enable-libcelt}.
125
126@section libgsm
127
128libgsm decoder wrapper.
129
130libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
131the presence of the libgsm headers and library during configuration. You need
132to explicitly configure the build with @code{--enable-libgsm}.
133
134This decoder supports both the ordinary GSM and the Microsoft variant.
135
136@section libilbc
137
138libilbc decoder wrapper.
139
140libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
141audio codec. Requires the presence of the libilbc headers and library during
142configuration. You need to explicitly configure the build with
143@code{--enable-libilbc}.
144
145@subsection Options
146
147The following option is supported by the libilbc wrapper.
148
149@table @option
150@item enhance
151
152Enable the enhancement of the decoded audio when set to 1. The default
153value is 0 (disabled).
154
155@end table
156
157@section libopencore-amrnb
158
159libopencore-amrnb decoder wrapper.
160
161libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
162Narrowband audio codec. Using it requires the presence of the
163libopencore-amrnb headers and library during configuration. You need to
164explicitly configure the build with @code{--enable-libopencore-amrnb}.
165
166An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
167without this library.
168
169@section libopencore-amrwb
170
171libopencore-amrwb decoder wrapper.
172
173libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
174Wideband audio codec. Using it requires the presence of the
175libopencore-amrwb headers and library during configuration. You need to
176explicitly configure the build with @code{--enable-libopencore-amrwb}.
177
178An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
179without this library.
180
181@section libopus
182
183libopus decoder wrapper.
184
185libopus allows libavcodec to decode the Opus Interactive Audio Codec.
186Requires the presence of the libopus headers and library during
187configuration. You need to explicitly configure the build with
188@code{--enable-libopus}.
189
190An FFmpeg native decoder for Opus exists, so users can decode Opus
191without this library.
192
193@c man end AUDIO DECODERS
194
195@chapter Subtitles Decoders
196@c man begin SUBTILES DECODERS
197
198@section dvbsub
199
200@subsection Options
201
202@table @option
203@item compute_clut
204@table @option
205@item -1
206Compute clut if no matching CLUT is in the stream.
207@item 0
208Never compute CLUT
209@item 1
210Always compute CLUT and override the one provided in the stream.
211@end table
212@item dvb_substream
213Selects the dvb substream, or all substreams if -1 which is default.
214
215@end table
216
217@section dvdsub
218
219This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
220also be found in VobSub file pairs and in some Matroska files.
221
222@subsection Options
223
224@table @option
225@item palette
226Specify the global palette used by the bitmaps. When stored in VobSub, the
227palette is normally specified in the index file; in Matroska, the palette is
228stored in the codec extra-data in the same format as in VobSub. In DVDs, the
229palette is stored in the IFO file, and therefore not available when reading
230from dumped VOB files.
231
232The format for this option is a string containing 16 24-bits hexadecimal
233numbers (without 0x prefix) separated by comas, for example @code{0d00ee,
234ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
2357b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
236
237@item ifo_palette
238Specify the IFO file from which the global palette is obtained.
239(experimental)
240
241@item forced_subs_only
242Only decode subtitle entries marked as forced. Some titles have forced
243and non-forced subtitles in the same track. Setting this flag to @code{1}
244will only keep the forced subtitles. Default value is @code{0}.
245@end table
246
247@section libzvbi-teletext
248
249Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
250subtitles. Requires the presence of the libzvbi headers and library during
251configuration. You need to explicitly configure the build with
252@code{--enable-libzvbi}.
253
254@subsection Options
255
256@table @option
257@item txt_page
258List of teletext page numbers to decode. You may use the special * string to
259match all pages. Pages that do not match the specified list are dropped.
260Default value is *.
261@item txt_chop_top
262Discards the top teletext line. Default value is 1.
263@item txt_format
264Specifies the format of the decoded subtitles. The teletext decoder is capable
265of decoding the teletext pages to bitmaps or to simple text, you should use
266"bitmap" for teletext pages, because certain graphics and colors cannot be
267expressed in simple text. You might use "text" for teletext based subtitles if
268your application can handle simple text based subtitles. Default value is
269bitmap.
270@item txt_left
271X offset of generated bitmaps, default is 0.
272@item txt_top
273Y offset of generated bitmaps, default is 0.
274@item txt_chop_spaces
275Chops leading and trailing spaces and removes empty lines from the generated
276text. This option is useful for teletext based subtitles where empty spaces may
277be present at the start or at the end of the lines or empty lines may be
278present between the subtitle lines because of double-sized teletext charactes.
279Default value is 1.
280@item txt_duration
281Sets the display duration of the decoded teletext pages or subtitles in
282milliseconds. Default value is 30000 which is 30 seconds.
283@item txt_transparent
284Force transparent background of the generated teletext bitmaps. Default value
285is 0 which means an opaque background.
286@item txt_opacity
287Sets the opacity (0-255) of the teletext background. If
288@option{txt_transparent} is not set, it only affects characters between a start
289box and an end box, typically subtitles. Default value is 0 if
290@option{txt_transparent} is set, 255 otherwise.
291
292@end table
293
294@c man end SUBTILES DECODERS
295