You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

254 lines
7.0KB

  1. \input texinfo @c -*- texinfo -*-
  2. @settitle FFmpeg Resampler Documentation
  3. @titlepage
  4. @center @titlefont{FFmpeg Resampler Documentation}
  5. @end titlepage
  6. @top
  7. @contents
  8. @chapter Description
  9. @c man begin DESCRIPTION
  10. The FFmpeg resampler provides an high-level interface to the
  11. libswresample library audio resampling utilities. In particular it
  12. allows to perform audio resampling, audio channel layout rematrixing,
  13. and convert audio format and packing layout.
  14. @c man end DESCRIPTION
  15. @chapter Resampler Options
  16. @c man begin RESAMPLER OPTIONS
  17. The audio resampler supports the following named options.
  18. Options may be set by specifying -@var{option} @var{value} in the
  19. FFmpeg tools, @var{option}=@var{value} for the aresample filter,
  20. by setting the value explicitly in the
  21. @code{SwrContext} options or using the @file{libavutil/opt.h} API for
  22. programmatic use.
  23. @table @option
  24. @item ich, in_channel_count
  25. Set the number of input channels. Default value is 0. Setting this
  26. value is not mandatory if the corresponding channel layout
  27. @option{in_channel_layout} is set.
  28. @item och, out_channel_count
  29. Set the number of output channels. Default value is 0. Setting this
  30. value is not mandatory if the corresponding channel layout
  31. @option{out_channel_layout} is set.
  32. @item uch, used_channel_count
  33. Set the number of used input channels. Default value is 0. This option is
  34. only used for special remapping.
  35. @item isr, in_sample_rate
  36. Set the input sample rate. Default value is 0.
  37. @item osr, out_sample_rate
  38. Set the output sample rate. Default value is 0.
  39. @item isf, in_sample_fmt
  40. Specify the input sample format. It is set by default to @code{none}.
  41. @item osf, out_sample_fmt
  42. Specify the output sample format. It is set by default to @code{none}.
  43. @item tsf, internal_sample_fmt
  44. Set the internal sample format. Default value is @code{none}.
  45. @item icl, in_channel_layout
  46. Set the input channel layout.
  47. @item ocl, out_channel_layout
  48. Set the output channel layout.
  49. @item clev, center_mix_level
  50. Set center mix level. It is a value expressed in deciBel, and must be
  51. inclusively included between -32 and +32.
  52. @item slev, surround_mix_level
  53. Set surround mix level. It is a value expressed in deciBel, and must
  54. be inclusively included between -32 and +32.
  55. @item lfe_mix_evel
  56. Set LFE mix level.
  57. @item rmvol, rematrix_volume
  58. Set rematrix volume. Default value is 1.0.
  59. @item flags, swr_flags
  60. Set flags used by the converter. Default value is 0.
  61. It supports the following individual flags:
  62. @table @option
  63. @item res
  64. force resampling
  65. @end table
  66. @item dither_scale
  67. Set the dither scale. Default value is 1.
  68. @item dither_method
  69. Set dither method. Default value is 0.
  70. Supported values:
  71. @table @samp
  72. @item rectangular
  73. select rectangular dither
  74. @item triangular
  75. select triangular dither
  76. @item triangular_hp
  77. select triangular dither with high pass
  78. @item lipshitz
  79. select lipshitz noise shaping dither
  80. @item shibata
  81. select shibata noise shaping dither
  82. @item low_shibata
  83. select low shibata noise shaping dither
  84. @item high_shibata
  85. select high shibata noise shaping dither
  86. @item f_weighted
  87. select f-weighted noise shaping dither
  88. @item modified_e_weighted
  89. select modified-e-weighted noise shaping dither
  90. @item improved_e_weighted
  91. select improved-e-weighted noise shaping dither
  92. @end table
  93. @item resampler
  94. Set resampling engine. Default value is swr.
  95. Supported values:
  96. @table @samp
  97. @item swr
  98. select the native SW Resampler; filter options precision and cheby are not
  99. applicable in this case.
  100. @item soxr
  101. select the SoX Resampler (where available); compensation, and filter options
  102. filter_size, phase_shift, filter_type & kaiser_beta, are not applicable in this
  103. case.
  104. @end table
  105. @item filter_size
  106. For swr only, set resampling filter size, default value is 32.
  107. @item phase_shift
  108. For swr only, set resampling phase shift, default value is 10, must be included
  109. between 0 and 30.
  110. @item linear_interp
  111. Use Linear Interpolation if set to 1, default value is 0.
  112. @item cutoff
  113. Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
  114. value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
  115. (which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
  116. @item precision
  117. For soxr only, the precision in bits to which the resampled signal will be
  118. calculated. The default value of 20 (which, with suitable dithering, is
  119. appropriate for a destination bit-depth of 16) gives SoX's 'High Quality'; a
  120. value of 28 gives SoX's 'Very High Quality'.
  121. @item cheby
  122. For soxr only, selects passband rolloff none (Chebyshev) & higher-precision
  123. approximation for 'irrational' ratios. Default value is 0.
  124. @item async
  125. For swr only, simple 1 parameter audio sync to timestamps using stretching,
  126. squeezing, filling and trimming. Setting this to 1 will enable filling and
  127. trimming, larger values represent the maximum amount in samples that the data
  128. may be stretched or squeezed for each second.
  129. Default value is 0, thus no compensation is applied to make the samples match
  130. the audio timestamps.
  131. @item min_comp
  132. For swr only, set the minimum difference between timestamps and audio data (in
  133. seconds) to trigger stretching/squeezing/filling or trimming of the
  134. data to make it match the timestamps. The default is that
  135. stretching/squeezing/filling and trimming is disabled
  136. (@option{min_comp} = @code{FLT_MAX}).
  137. @item min_hard_comp
  138. For swr only, set the minimum difference between timestamps and audio data (in
  139. seconds) to trigger adding/dropping samples to make it match the
  140. timestamps. This option effectively is a threshold to select between
  141. hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
  142. all compensation is by default disabled through @option{min_comp}.
  143. The default is 0.1.
  144. @item comp_duration
  145. For swr only, set duration (in seconds) over which data is stretched/squeezed
  146. to make it match the timestamps. Must be a non-negative double float value,
  147. default value is 1.0.
  148. @item max_soft_comp
  149. For swr only, set maximum factor by which data is stretched/squeezed to make it
  150. match the timestamps. Must be a non-negative double float value, default value
  151. is 0.
  152. @item matrix_encoding
  153. Select matrixed stereo encoding.
  154. It accepts the following values:
  155. @table @samp
  156. @item none
  157. select none
  158. @item dolby
  159. select Dolby
  160. @item dplii
  161. select Dolby Pro Logic II
  162. @end table
  163. Default value is @code{none}.
  164. @item filter_type
  165. For swr only, select resampling filter type. This only affects resampling
  166. operations.
  167. It accepts the following values:
  168. @table @samp
  169. @item cubic
  170. select cubic
  171. @item blackman_nuttall
  172. select Blackman Nuttall Windowed Sinc
  173. @item kaiser
  174. select Kaiser Windowed Sinc
  175. @end table
  176. @item kaiser_beta
  177. For swr only, set Kaiser Window Beta value. Must be an integer included between
  178. 2 and 16, default value is 9.
  179. @end table
  180. @c man end RESAMPLER OPTIONS
  181. @chapter See Also
  182. @ifhtml
  183. @url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
  184. @url{libswresample.html,libswresample}
  185. @end ifhtml
  186. @ifnothtml
  187. ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libswresample(3)
  188. @end ifnothtml
  189. @include authors.texi
  190. @ignore
  191. @setfilename ffmpeg-resampler
  192. @settitle FFmpeg Resampler
  193. @end ignore
  194. @bye