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