decoders.texi 8.7 KB

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