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