decoders.texi 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. @c man end VIDEO DECODERS
  37. @chapter Audio Decoders
  38. @c man begin AUDIO DECODERS
  39. A description of some of the currently available audio decoders
  40. follows.
  41. @section ac3
  42. AC-3 audio decoder.
  43. This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as well as
  44. the undocumented RealAudio 3 (a.k.a. dnet).
  45. @subsection AC-3 Decoder Options
  46. @table @option
  47. @item -drc_scale @var{value}
  48. Dynamic Range Scale Factor. The factor to apply to dynamic range values
  49. from the AC-3 stream. This factor is applied exponentially.
  50. There are 3 notable scale factor ranges:
  51. @table @option
  52. @item drc_scale == 0
  53. DRC disabled. Produces full range audio.
  54. @item 0 < drc_scale <= 1
  55. DRC enabled. Applies a fraction of the stream DRC value.
  56. Audio reproduction is between full range and full compression.
  57. @item drc_scale > 1
  58. DRC enabled. Applies drc_scale asymmetrically.
  59. Loud sounds are fully compressed. Soft sounds are enhanced.
  60. @end table
  61. @end table
  62. @section ffwavesynth
  63. Internal wave synthetizer.
  64. This decoder generates wave patterns according to predefined sequences. Its
  65. use is purely internal and the format of the data it accepts is not publicly
  66. documented.
  67. @section libcelt
  68. libcelt decoder wrapper.
  69. libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
  70. Requires the presence of the libcelt headers and library during configuration.
  71. You need to explicitly configure the build with @code{--enable-libcelt}.
  72. @section libgsm
  73. libgsm decoder wrapper.
  74. libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
  75. the presence of the libgsm headers and library during configuration. You need
  76. to explicitly configure the build with @code{--enable-libgsm}.
  77. This decoder supports both the ordinary GSM and the Microsoft variant.
  78. @section libilbc
  79. libilbc decoder wrapper.
  80. libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
  81. audio codec. Requires the presence of the libilbc headers and library during
  82. configuration. You need to explicitly configure the build with
  83. @code{--enable-libilbc}.
  84. @subsection Options
  85. The following option is supported by the libilbc wrapper.
  86. @table @option
  87. @item enhance
  88. Enable the enhancement of the decoded audio when set to 1. The default
  89. value is 0 (disabled).
  90. @end table
  91. @section libopencore-amrnb
  92. libopencore-amrnb decoder wrapper.
  93. libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
  94. Narrowband audio codec. Using it requires the presence of the
  95. libopencore-amrnb headers and library during configuration. You need to
  96. explicitly configure the build with @code{--enable-libopencore-amrnb}.
  97. An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
  98. without this library.
  99. @section libopencore-amrwb
  100. libopencore-amrwb decoder wrapper.
  101. libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
  102. Wideband audio codec. Using it requires the presence of the
  103. libopencore-amrwb headers and library during configuration. You need to
  104. explicitly configure the build with @code{--enable-libopencore-amrwb}.
  105. An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
  106. without this library.
  107. @section libopus
  108. libopus decoder wrapper.
  109. libopus allows libavcodec to decode the Opus Interactive Audio Codec.
  110. Requires the presence of the libopus headers and library during
  111. configuration. You need to explicitly configure the build with
  112. @code{--enable-libopus}.
  113. An FFmpeg native decoder for Opus exists, so users can decode Opus
  114. without this library.
  115. @c man end AUDIO DECODERS
  116. @chapter Subtitles Decoders
  117. @c man begin SUBTILES DECODERS
  118. @section dvdsub
  119. This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
  120. also be found in VobSub file pairs and in some Matroska files.
  121. @subsection Options
  122. @table @option
  123. @item palette
  124. Specify the global palette used by the bitmaps. When stored in VobSub, the
  125. palette is normally specified in the index file; in Matroska, the palette is
  126. stored in the codec extra-data in the same format as in VobSub. In DVDs, the
  127. palette is stored in the IFO file, and therefore not available when reading
  128. from dumped VOB files.
  129. The format for this option is a string containing 16 24-bits hexadecimal
  130. numbers (without 0x prefix) separated by comas, for example @code{0d00ee,
  131. ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
  132. 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
  133. @end table
  134. @section libzvbi-teletext
  135. Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
  136. subtitles. Requires the presence of the libzvbi headers and library during
  137. configuration. You need to explicitly configure the build with
  138. @code{--enable-libzvbi}.
  139. @subsection Options
  140. @table @option
  141. @item txt_page
  142. List of teletext page numbers to decode. You may use the special * string to
  143. match all pages. Pages that do not match the specified list are dropped.
  144. Default value is *.
  145. @item txt_chop_top
  146. Discards the top teletext line. Default value is 1.
  147. @item txt_format
  148. Specifies the format of the decoded subtitles. The teletext decoder is capable
  149. of decoding the teletext pages to bitmaps or to simple text, you should use
  150. "bitmap" for teletext pages, because certain graphics and colors cannot be
  151. expressed in simple text. You might use "text" for teletext based subtitles if
  152. your application can handle simple text based subtitles. Default value is
  153. bitmap.
  154. @item txt_left
  155. X offset of generated bitmaps, default is 0.
  156. @item txt_top
  157. Y offset of generated bitmaps, default is 0.
  158. @item txt_chop_spaces
  159. Chops leading and trailing spaces and removes empty lines from the generated
  160. text. This option is useful for teletext based subtitles where empty spaces may
  161. be present at the start or at the end of the lines or empty lines may be
  162. present between the subtitle lines because of double-sized teletext charactes.
  163. Default value is 1.
  164. @item txt_duration
  165. Sets the display duration of the decoded teletext pages or subtitles in
  166. miliseconds. Default value is 30000 which is 30 seconds.
  167. @item txt_transparent
  168. Force transparent background of the generated teletext bitmaps. Default value
  169. is 0 which means an opaque (black) background.
  170. @end table
  171. @c man end SUBTILES DECODERS