decoders.texi 8.9 KB

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