decoders.texi 11 KB

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