1 \input texinfo @c -*- texinfo -*-
3 @settitle FFmpeg Resampler Documentation
5 @center @titlefont{FFmpeg Resampler Documentation}
13 @c man begin DESCRIPTION
15 The FFmpeg resampler provides an high-level interface to the
16 libswresample library audio resampling utilities. In particular it
17 allows to perform audio resampling, audio channel layout rematrixing,
18 and convert audio format and packing layout.
20 @c man end DESCRIPTION
22 @chapter Resampler Options
23 @c man begin RESAMPLER OPTIONS
25 The audio resampler supports the following named options.
27 Options may be set by specifying -@var{option} @var{value} in the
28 FFmpeg tools, @var{option}=@var{value} for the aresample filter,
29 by setting the value explicitly in the
30 @code{SwrContext} options or using the @file{libavutil/opt.h} API for
35 @item ich, in_channel_count
36 Set the number of input channels. Default value is 0. Setting this
37 value is not mandatory if the corresponding channel layout
38 @option{in_channel_layout} is set.
40 @item och, out_channel_count
41 Set the number of output channels. Default value is 0. Setting this
42 value is not mandatory if the corresponding channel layout
43 @option{out_channel_layout} is set.
45 @item uch, used_channel_count
46 Set the number of used channels. Default value is 0. This option is
47 only used for special remapping.
49 @item isr, in_sample_rate
50 Set the input sample rate. Default value is 0.
52 @item osr, out_sample_rate
53 Set the output sample rate. Default value is 0.
55 @item isf, in_sample_fmt
56 Specify the input sample format. It is set by default to @code{none}.
58 @item osf, out_sample_fmt
59 Specify the output sample format. It is set by default to @code{none}.
61 @item tsf, internal_sample_fmt
62 Set the internal sample format. Default value is @code{none}.
64 @item icl, in_channel_layout
65 Set the input channel layout.
67 @item ocl, out_channel_layout
68 Set the output channel layout.
70 @item clev, center_mix_level
71 Set center mix level. It is a value expressed in deciBel, and must be
72 inclusively included between -32 and +32.
74 @item slev, surround_mix_level
75 Set surround mix level. It is a value expressed in deciBel, and must
76 be inclusively included between -32 and +32.
81 @item rmvol, rematrix_volume
82 Set rematrix volume. Default value is 1.0.
84 @item flags, swr_flags
85 Set flags used by the converter. Default value is 0.
87 It supports the following individual flags:
94 Set the dither scale. Default value is 1.
97 Set dither method. Default value is 0.
102 select rectangular dither
104 select triangular dither
106 select triangular dither with high pass
110 Set resampling engine. Default value is swr.
115 select the native SW Resampler; filter options precision and cheby are not
116 applicable in this case.
118 select the SoX Resampler (where available); compensation, and filter options
119 filter_size, phase_shift, filter_type & kaiser_beta, are not applicable in this
124 For swr only, set resampling filter size, default value is 32.
127 For swr only, set resampling phase shift, default value is 10, must be included
131 Use Linear Interpolation if set to 1, default value is 0.
134 Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
135 value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
136 (which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
139 For soxr only, the precision in bits to which the resampled signal will be
140 calculated. The default value of 20 (which, with suitable dithering, is
141 appropriate for a destination bit-depth of 16) gives SoX's 'High Quality'; a
142 value of 28 gives SoX's 'Very High Quality'.
145 For soxr only, selects passband rolloff none (Chebyshev) & higher-precision
146 approximation for 'irrational' ratios. Default value is 0.
149 For swr only, simple 1 parameter audio sync to timestamps using stretching,
150 squeezing, filling and trimming. Setting this to 1 will enable filling and
151 trimming, larger values represent the maximum amount in samples that the data
152 may be stretched or squeezed for each second.
153 Default value is 0, thus no compensation is applied to make the samples match
154 the audio timestamps.
157 For swr only, set the minimum difference between timestamps and audio data (in
158 seconds) to trigger stretching/squeezing/filling or trimming of the
159 data to make it match the timestamps. The default is that
160 stretching/squeezing/filling and trimming is disabled
161 (@option{min_comp} = @code{FLT_MAX}).
164 For swr only, set the minimum difference between timestamps and audio data (in
165 seconds) to trigger adding/dropping samples to make it match the
166 timestamps. This option effectively is a threshold to select between
167 hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
168 all compensation is by default disabled through @option{min_comp}.
172 For swr only, set duration (in seconds) over which data is stretched/squeezed
173 to make it match the timestamps. Must be a non-negative double float value,
174 default value is 1.0.
177 For swr only, set maximum factor by which data is stretched/squeezed to make it
178 match the timestamps. Must be a non-negative double float value, default value
181 @item matrix_encoding
182 Select matrixed stereo encoding.
184 It accepts the following values:
191 select Dolby Pro Logic II
194 Default value is @code{none}.
197 For swr only, select resampling filter type. This only affects resampling
200 It accepts the following values:
204 @item blackman_nuttall
205 select Blackman Nuttall Windowed Sinc
207 select Kaiser Windowed Sinc
211 For swr only, set Kaiser Window Beta value. Must be an integer included between
212 2 and 16, default value is 9.
216 @c man end RESAMPLER OPTIONS
221 @url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
222 @url{libswresample.html,libswresample}
226 ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libswresample(3)
229 @include authors.texi
233 @setfilename ffmpeg-resampler
234 @settitle FFmpeg Resampler