decoders.texi 10 KB

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