decoders.texi 13 KB

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