yading@10: @chapter Resampler Options yading@10: @c man begin RESAMPLER OPTIONS yading@10: yading@10: The audio resampler supports the following named options. yading@10: yading@10: Options may be set by specifying -@var{option} @var{value} in the yading@10: FFmpeg tools, @var{option}=@var{value} for the aresample filter, yading@10: by setting the value explicitly in the yading@10: @code{SwrContext} options or using the @file{libavutil/opt.h} API for yading@10: programmatic use. yading@10: yading@10: @table @option yading@10: yading@10: @item ich, in_channel_count yading@10: Set the number of input channels. Default value is 0. Setting this yading@10: value is not mandatory if the corresponding channel layout yading@10: @option{in_channel_layout} is set. yading@10: yading@10: @item och, out_channel_count yading@10: Set the number of output channels. Default value is 0. Setting this yading@10: value is not mandatory if the corresponding channel layout yading@10: @option{out_channel_layout} is set. yading@10: yading@10: @item uch, used_channel_count yading@10: Set the number of used input channels. Default value is 0. This option is yading@10: only used for special remapping. yading@10: yading@10: @item isr, in_sample_rate yading@10: Set the input sample rate. Default value is 0. yading@10: yading@10: @item osr, out_sample_rate yading@10: Set the output sample rate. Default value is 0. yading@10: yading@10: @item isf, in_sample_fmt yading@10: Specify the input sample format. It is set by default to @code{none}. yading@10: yading@10: @item osf, out_sample_fmt yading@10: Specify the output sample format. It is set by default to @code{none}. yading@10: yading@10: @item tsf, internal_sample_fmt yading@10: Set the internal sample format. Default value is @code{none}. yading@10: This will automatically be chosen when it is not explicitly set. yading@10: yading@10: @item icl, in_channel_layout yading@10: Set the input channel layout. yading@10: yading@10: @item ocl, out_channel_layout yading@10: Set the output channel layout. yading@10: yading@10: @item clev, center_mix_level yading@10: Set the center mix level. It is a value expressed in deciBel, and must be yading@10: in the interval [-32,32]. yading@10: yading@10: @item slev, surround_mix_level yading@10: Set the surround mix level. It is a value expressed in deciBel, and must yading@10: be in the interval [-32,32]. yading@10: yading@10: @item lfe_mix_level yading@10: Set LFE mix into non LFE level. It is used when there is a LFE input but no yading@10: LFE output. It is a value expressed in deciBel, and must yading@10: be in the interval [-32,32]. yading@10: yading@10: @item rmvol, rematrix_volume yading@10: Set rematrix volume. Default value is 1.0. yading@10: yading@10: @item flags, swr_flags yading@10: Set flags used by the converter. Default value is 0. yading@10: yading@10: It supports the following individual flags: yading@10: @table @option yading@10: @item res yading@10: force resampling, this flag forces resampling to be used even when the yading@10: input and output sample rates match. yading@10: @end table yading@10: yading@10: @item dither_scale yading@10: Set the dither scale. Default value is 1. yading@10: yading@10: @item dither_method yading@10: Set dither method. Default value is 0. yading@10: yading@10: Supported values: yading@10: @table @samp yading@10: @item rectangular yading@10: select rectangular dither yading@10: @item triangular yading@10: select triangular dither yading@10: @item triangular_hp yading@10: select triangular dither with high pass yading@10: @item lipshitz yading@10: select lipshitz noise shaping dither yading@10: @item shibata yading@10: select shibata noise shaping dither yading@10: @item low_shibata yading@10: select low shibata noise shaping dither yading@10: @item high_shibata yading@10: select high shibata noise shaping dither yading@10: @item f_weighted yading@10: select f-weighted noise shaping dither yading@10: @item modified_e_weighted yading@10: select modified-e-weighted noise shaping dither yading@10: @item improved_e_weighted yading@10: select improved-e-weighted noise shaping dither yading@10: yading@10: @end table yading@10: yading@10: @item resampler yading@10: Set resampling engine. Default value is swr. yading@10: yading@10: Supported values: yading@10: @table @samp yading@10: @item swr yading@10: select the native SW Resampler; filter options precision and cheby are not yading@10: applicable in this case. yading@10: @item soxr yading@10: select the SoX Resampler (where available); compensation, and filter options yading@10: filter_size, phase_shift, filter_type & kaiser_beta, are not applicable in this yading@10: case. yading@10: @end table yading@10: yading@10: @item filter_size yading@10: For swr only, set resampling filter size, default value is 32. yading@10: yading@10: @item phase_shift yading@10: For swr only, set resampling phase shift, default value is 10, and must be in yading@10: the interval [0,30]. yading@10: yading@10: @item linear_interp yading@10: Use Linear Interpolation if set to 1, default value is 0. yading@10: yading@10: @item cutoff yading@10: Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float yading@10: value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr yading@10: (which, with a sample-rate of 44100, preserves the entire audio band to 20kHz). yading@10: yading@10: @item precision yading@10: For soxr only, the precision in bits to which the resampled signal will be yading@10: calculated. The default value of 20 (which, with suitable dithering, is yading@10: appropriate for a destination bit-depth of 16) gives SoX's 'High Quality'; a yading@10: value of 28 gives SoX's 'Very High Quality'. yading@10: yading@10: @item cheby yading@10: For soxr only, selects passband rolloff none (Chebyshev) & higher-precision yading@10: approximation for 'irrational' ratios. Default value is 0. yading@10: yading@10: @item async yading@10: For swr only, simple 1 parameter audio sync to timestamps using stretching, yading@10: squeezing, filling and trimming. Setting this to 1 will enable filling and yading@10: trimming, larger values represent the maximum amount in samples that the data yading@10: may be stretched or squeezed for each second. yading@10: Default value is 0, thus no compensation is applied to make the samples match yading@10: the audio timestamps. yading@10: yading@10: @item first_pts yading@10: For swr only, assume the first pts should be this value. The time unit is 1 / sample rate. yading@10: This allows for padding/trimming at the start of stream. By default, no yading@10: assumption is made about the first frame's expected pts, so no padding or yading@10: trimming is done. For example, this could be set to 0 to pad the beginning with yading@10: silence if an audio stream starts after the video stream or to trim any samples yading@10: with a negative pts due to encoder delay. yading@10: yading@10: @item min_comp yading@10: For swr only, set the minimum difference between timestamps and audio data (in yading@10: seconds) to trigger stretching/squeezing/filling or trimming of the yading@10: data to make it match the timestamps. The default is that yading@10: stretching/squeezing/filling and trimming is disabled yading@10: (@option{min_comp} = @code{FLT_MAX}). yading@10: yading@10: @item min_hard_comp yading@10: For swr only, set the minimum difference between timestamps and audio data (in yading@10: seconds) to trigger adding/dropping samples to make it match the yading@10: timestamps. This option effectively is a threshold to select between yading@10: hard (trim/fill) and soft (squeeze/stretch) compensation. Note that yading@10: all compensation is by default disabled through @option{min_comp}. yading@10: The default is 0.1. yading@10: yading@10: @item comp_duration yading@10: For swr only, set duration (in seconds) over which data is stretched/squeezed yading@10: to make it match the timestamps. Must be a non-negative double float value, yading@10: default value is 1.0. yading@10: yading@10: @item max_soft_comp yading@10: For swr only, set maximum factor by which data is stretched/squeezed to make it yading@10: match the timestamps. Must be a non-negative double float value, default value yading@10: is 0. yading@10: yading@10: @item matrix_encoding yading@10: Select matrixed stereo encoding. yading@10: yading@10: It accepts the following values: yading@10: @table @samp yading@10: @item none yading@10: select none yading@10: @item dolby yading@10: select Dolby yading@10: @item dplii yading@10: select Dolby Pro Logic II yading@10: @end table yading@10: yading@10: Default value is @code{none}. yading@10: yading@10: @item filter_type yading@10: For swr only, select resampling filter type. This only affects resampling yading@10: operations. yading@10: yading@10: It accepts the following values: yading@10: @table @samp yading@10: @item cubic yading@10: select cubic yading@10: @item blackman_nuttall yading@10: select Blackman Nuttall Windowed Sinc yading@10: @item kaiser yading@10: select Kaiser Windowed Sinc yading@10: @end table yading@10: yading@10: @item kaiser_beta yading@10: For swr only, set Kaiser Window Beta value. Must be an integer in the yading@10: interval [2,16], default value is 9. yading@10: yading@10: @end table yading@10: yading@10: @c man end RESAMPLER OPTIONS