decoders.texi 13 KB

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