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.

258 lines
7.3KB

  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. This will automatically be choosen when its not explicitly set.
  46. @item icl, in_channel_layout
  47. Set the input channel layout.
  48. @item ocl, out_channel_layout
  49. Set the output channel layout.
  50. @item clev, center_mix_level
  51. Set the center mix level. It is a value expressed in deciBel, and must be
  52. in the interval [-32,32].
  53. @item slev, surround_mix_level
  54. Set the surround mix level. It is a value expressed in deciBel, and must
  55. be in the interval [-32,32].
  56. @item lfe_mix_level
  57. Set LFE mix into non LFE level. It is used when there is a LFE input but no
  58. LFE output. It is a value expressed in deciBel, and must
  59. be in the interval [-32,32].
  60. @item rmvol, rematrix_volume
  61. Set rematrix volume. Default value is 1.0.
  62. @item flags, swr_flags
  63. Set flags used by the converter. Default value is 0.
  64. It supports the following individual flags:
  65. @table @option
  66. @item res
  67. force resampling, this flag forces resampling to be used even when the
  68. input and output sample rates match.
  69. @end table
  70. @item dither_scale
  71. Set the dither scale. Default value is 1.
  72. @item dither_method
  73. Set dither method. Default value is 0.
  74. Supported values:
  75. @table @samp
  76. @item rectangular
  77. select rectangular dither
  78. @item triangular
  79. select triangular dither
  80. @item triangular_hp
  81. select triangular dither with high pass
  82. @item lipshitz
  83. select lipshitz noise shaping dither
  84. @item shibata
  85. select shibata noise shaping dither
  86. @item low_shibata
  87. select low shibata noise shaping dither
  88. @item high_shibata
  89. select high shibata noise shaping dither
  90. @item f_weighted
  91. select f-weighted noise shaping dither
  92. @item modified_e_weighted
  93. select modified-e-weighted noise shaping dither
  94. @item improved_e_weighted
  95. select improved-e-weighted noise shaping dither
  96. @end table
  97. @item resampler
  98. Set resampling engine. Default value is swr.
  99. Supported values:
  100. @table @samp
  101. @item swr
  102. select the native SW Resampler; filter options precision and cheby are not
  103. applicable in this case.
  104. @item soxr
  105. select the SoX Resampler (where available); compensation, and filter options
  106. filter_size, phase_shift, filter_type & kaiser_beta, are not applicable in this
  107. case.
  108. @end table
  109. @item filter_size
  110. For swr only, set resampling filter size, default value is 32.
  111. @item phase_shift
  112. For swr only, set resampling phase shift, default value is 10, and must be in
  113. the interval [0,30].
  114. @item linear_interp
  115. Use Linear Interpolation if set to 1, default value is 0.
  116. @item cutoff
  117. Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
  118. value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
  119. (which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
  120. @item precision
  121. For soxr only, the precision in bits to which the resampled signal will be
  122. calculated. The default value of 20 (which, with suitable dithering, is
  123. appropriate for a destination bit-depth of 16) gives SoX's 'High Quality'; a
  124. value of 28 gives SoX's 'Very High Quality'.
  125. @item cheby
  126. For soxr only, selects passband rolloff none (Chebyshev) & higher-precision
  127. approximation for 'irrational' ratios. Default value is 0.
  128. @item async
  129. For swr only, simple 1 parameter audio sync to timestamps using stretching,
  130. squeezing, filling and trimming. Setting this to 1 will enable filling and
  131. trimming, larger values represent the maximum amount in samples that the data
  132. may be stretched or squeezed for each second.
  133. Default value is 0, thus no compensation is applied to make the samples match
  134. the audio timestamps.
  135. @item min_comp
  136. For swr only, set the minimum difference between timestamps and audio data (in
  137. seconds) to trigger stretching/squeezing/filling or trimming of the
  138. data to make it match the timestamps. The default is that
  139. stretching/squeezing/filling and trimming is disabled
  140. (@option{min_comp} = @code{FLT_MAX}).
  141. @item min_hard_comp
  142. For swr only, set the minimum difference between timestamps and audio data (in
  143. seconds) to trigger adding/dropping samples to make it match the
  144. timestamps. This option effectively is a threshold to select between
  145. hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
  146. all compensation is by default disabled through @option{min_comp}.
  147. The default is 0.1.
  148. @item comp_duration
  149. For swr only, set duration (in seconds) over which data is stretched/squeezed
  150. to make it match the timestamps. Must be a non-negative double float value,
  151. default value is 1.0.
  152. @item max_soft_comp
  153. For swr only, set maximum factor by which data is stretched/squeezed to make it
  154. match the timestamps. Must be a non-negative double float value, default value
  155. is 0.
  156. @item matrix_encoding
  157. Select matrixed stereo encoding.
  158. It accepts the following values:
  159. @table @samp
  160. @item none
  161. select none
  162. @item dolby
  163. select Dolby
  164. @item dplii
  165. select Dolby Pro Logic II
  166. @end table
  167. Default value is @code{none}.
  168. @item filter_type
  169. For swr only, select resampling filter type. This only affects resampling
  170. operations.
  171. It accepts the following values:
  172. @table @samp
  173. @item cubic
  174. select cubic
  175. @item blackman_nuttall
  176. select Blackman Nuttall Windowed Sinc
  177. @item kaiser
  178. select Kaiser Windowed Sinc
  179. @end table
  180. @item kaiser_beta
  181. For swr only, set Kaiser Window Beta value. Must be an integer in the
  182. interval [2,16], default value is 9.
  183. @end table
  184. @c man end RESAMPLER OPTIONS
  185. @chapter See Also
  186. @ifhtml
  187. @url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
  188. @url{libswresample.html,libswresample}
  189. @end ifhtml
  190. @ifnothtml
  191. ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libswresample(3)
  192. @end ifnothtml
  193. @include authors.texi
  194. @ignore
  195. @setfilename ffmpeg-resampler
  196. @settitle FFmpeg Resampler
  197. @end ignore
  198. @bye