2012-11-02 11:24:04 +00:00
|
|
|
\input texinfo @c -*- texinfo -*-
|
|
|
|
|
|
|
|
@settitle FFmpeg Resampler Documentation
|
|
|
|
@titlepage
|
|
|
|
@center @titlefont{FFmpeg Resampler Documentation}
|
|
|
|
@end titlepage
|
|
|
|
|
|
|
|
@top
|
|
|
|
|
|
|
|
@contents
|
|
|
|
|
|
|
|
@chapter Description
|
|
|
|
@c man begin DESCRIPTION
|
|
|
|
|
|
|
|
The FFmpeg resampler provides an high-level interface to the
|
|
|
|
libswresample library audio resampling utilities. In particular it
|
|
|
|
allows to perform audio resampling, audio channel layout rematrixing,
|
|
|
|
and convert audio format and packing layout.
|
|
|
|
|
|
|
|
@c man end DESCRIPTION
|
|
|
|
|
|
|
|
@chapter Resampler Options
|
|
|
|
@c man begin RESAMPLER OPTIONS
|
|
|
|
|
|
|
|
The audio resampler supports the following named options.
|
|
|
|
|
|
|
|
Options may be set by specifying -@var{option} @var{value} in the
|
2012-12-23 17:31:33 +00:00
|
|
|
FFmpeg tools, @var{option}=@var{value} for the aresample filter,
|
|
|
|
by setting the value explicitly in the
|
2012-11-02 11:24:04 +00:00
|
|
|
@code{SwrContext} options or using the @file{libavutil/opt.h} API for
|
|
|
|
programmatic use.
|
|
|
|
|
|
|
|
@table @option
|
|
|
|
|
|
|
|
@item ich, in_channel_count
|
|
|
|
Set the number of input channels. Default value is 0. Setting this
|
|
|
|
value is not mandatory if the corresponding channel layout
|
|
|
|
@option{in_channel_layout} is set.
|
|
|
|
|
|
|
|
@item och, out_channel_count
|
|
|
|
Set the number of output channels. Default value is 0. Setting this
|
|
|
|
value is not mandatory if the corresponding channel layout
|
|
|
|
@option{out_channel_layout} is set.
|
|
|
|
|
|
|
|
@item uch, used_channel_count
|
|
|
|
Set the number of used channels. Default value is 0. This option is
|
|
|
|
only used for special remapping.
|
|
|
|
|
|
|
|
@item isr, in_sample_rate
|
|
|
|
Set the input sample rate. Default value is 0.
|
|
|
|
|
|
|
|
@item osr, out_sample_rate
|
|
|
|
Set the output sample rate. Default value is 0.
|
|
|
|
|
|
|
|
@item isf, in_sample_fmt
|
2012-11-04 14:45:09 +00:00
|
|
|
Specify the input sample format. It is set by default to @code{none}.
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@item osf, out_sample_fmt
|
2012-11-04 14:45:09 +00:00
|
|
|
Specify the output sample format. It is set by default to @code{none}.
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@item tsf, internal_sample_fmt
|
2012-11-04 14:45:09 +00:00
|
|
|
Set the internal sample format. Default value is @code{none}.
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@item icl, in_channel_layout
|
|
|
|
Set the input channel layout.
|
|
|
|
|
|
|
|
@item ocl, out_channel_layout
|
|
|
|
Set the output channel layout.
|
|
|
|
|
|
|
|
@item clev, center_mix_level
|
|
|
|
Set center mix level. It is a value expressed in deciBel, and must be
|
|
|
|
inclusively included between -32 and +32.
|
|
|
|
|
|
|
|
@item slev, surround_mix_level
|
|
|
|
Set surround mix level. It is a value expressed in deciBel, and must
|
|
|
|
be inclusively included between -32 and +32.
|
|
|
|
|
|
|
|
@item lfe_mix_evel
|
|
|
|
Set LFE mix level.
|
|
|
|
|
|
|
|
@item rmvol, rematrix_volume
|
|
|
|
Set rematrix volume. Default value is 1.0.
|
|
|
|
|
|
|
|
@item flags, swr_flags
|
|
|
|
Set flags used by the converter. Default value is 0.
|
|
|
|
|
|
|
|
It supports the following individual flags:
|
|
|
|
@table @option
|
|
|
|
@item res
|
|
|
|
force resampling
|
|
|
|
@end table
|
|
|
|
|
|
|
|
@item dither_scale
|
|
|
|
Set the dither scale. Default value is 1.
|
|
|
|
|
|
|
|
@item dither_method
|
|
|
|
Set dither method. Default value is 0.
|
|
|
|
|
|
|
|
Supported values:
|
|
|
|
@table @samp
|
|
|
|
@item rectangular
|
|
|
|
select rectangular dither
|
|
|
|
@item triangular
|
|
|
|
select triangular dither
|
|
|
|
@item triangular_hp
|
|
|
|
select triangular dither with high pass
|
|
|
|
@end table
|
|
|
|
|
2012-12-27 11:07:15 +00:00
|
|
|
@item resampler
|
|
|
|
Set resampling engine. Default value is swr.
|
|
|
|
|
|
|
|
Supported values:
|
|
|
|
@table @samp
|
|
|
|
@item swr
|
|
|
|
select the native SW Resampler; filter options precision and cheby are not
|
|
|
|
applicable in this case.
|
|
|
|
@item soxr
|
|
|
|
select the SoX Resampler (where available); compensation, and filter options
|
|
|
|
filter_size, phase_shift, filter_type & kaiser_beta, are not applicable in this
|
|
|
|
case.
|
|
|
|
@end table
|
|
|
|
|
2012-11-02 11:24:04 +00:00
|
|
|
@item filter_size
|
2012-12-27 11:07:15 +00:00
|
|
|
For swr only, set resampling filter size, default value is 16.
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@item phase_shift
|
2012-12-27 11:07:15 +00:00
|
|
|
For swr only, set resampling phase shift, default value is 10, must be included
|
2012-11-02 11:24:04 +00:00
|
|
|
between 0 and 30.
|
|
|
|
|
|
|
|
@item linear_interp
|
|
|
|
Use Linear Interpolation if set to 1, default value is 0.
|
|
|
|
|
|
|
|
@item cutoff
|
2012-12-27 11:07:15 +00:00
|
|
|
Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
|
|
|
|
value between 0 and 1. Default value is 0.8 with swr, and 0.91 with soxr
|
|
|
|
(which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
|
|
|
|
|
|
|
|
@item precision
|
|
|
|
For soxr only, the precision in bits to which the resampled signal will be
|
|
|
|
calculated. The default value of 20 (which, with suitable dithering, is
|
|
|
|
appropriate for a destination bit-depth of 16) gives SoX's 'High Quality'; a
|
|
|
|
value of 28 gives SoX's 'Very High Quality'.
|
|
|
|
|
|
|
|
@item cheby
|
|
|
|
For soxr only, selects passband rolloff none (Chebyshev) & higher-precision
|
|
|
|
approximation for 'irrational' ratios. Default value is 0.
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@item min_comp
|
2012-12-27 11:07:15 +00:00
|
|
|
For swr only, set the minimum difference between timestamps and audio data (in
|
2012-12-26 00:39:08 +00:00
|
|
|
seconds) to trigger stretching/squeezing/filling or trimming of the
|
|
|
|
data to make it match the timestamps. The default is that
|
|
|
|
stretching/squeezing/filling and trimming is disabled
|
|
|
|
(@option{min_comp} = @code{FLT_MAX}).
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@item min_hard_comp
|
2012-12-27 11:07:15 +00:00
|
|
|
For swr only, set the minimum difference between timestamps and audio data (in
|
2012-12-26 00:39:08 +00:00
|
|
|
seconds) to trigger adding/dropping samples to make it match the
|
|
|
|
timestamps. This option effectively is a threshold to select between
|
|
|
|
hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
|
|
|
|
all compensation is by default disabled through @option{min_comp}.
|
|
|
|
The default is 0.1.
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@item comp_duration
|
2012-12-27 11:07:15 +00:00
|
|
|
For swr only, set duration (in seconds) over which data is stretched/squeezed
|
|
|
|
to make it match the timestamps. Must be a non-negative double float value,
|
|
|
|
default value is 1.0.
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@item max_soft_comp
|
2012-12-27 11:07:15 +00:00
|
|
|
For swr only, set maximum factor by which data is stretched/squeezed to make it
|
|
|
|
match the timestamps. Must be a non-negative double float value, default value
|
|
|
|
is 0.
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@item matrix_encoding
|
|
|
|
Select matrixed stereo encoding.
|
|
|
|
|
|
|
|
It accepts the following values:
|
|
|
|
@table @samp
|
|
|
|
@item none
|
|
|
|
select none
|
|
|
|
@item dolby
|
|
|
|
select Dolby
|
|
|
|
@item dplii
|
|
|
|
select Dolby Pro Logic II
|
|
|
|
@end table
|
|
|
|
|
|
|
|
Default value is @code{none}.
|
|
|
|
|
|
|
|
@item filter_type
|
2012-12-27 11:07:15 +00:00
|
|
|
For swr only, select resampling filter type. This only affects resampling
|
2012-11-02 11:24:04 +00:00
|
|
|
operations.
|
|
|
|
|
|
|
|
It accepts the following values:
|
|
|
|
@table @samp
|
|
|
|
@item cubic
|
|
|
|
select cubic
|
|
|
|
@item blackman_nuttall
|
|
|
|
select Blackman Nuttall Windowed Sinc
|
|
|
|
@item kaiser
|
|
|
|
select Kaiser Windowed Sinc
|
|
|
|
@end table
|
|
|
|
|
|
|
|
@item kaiser_beta
|
2012-12-27 11:07:15 +00:00
|
|
|
For swr only, set Kaiser Window Beta value. Must be an integer included between
|
|
|
|
2 and 16, default value is 9.
|
2012-11-02 11:24:04 +00:00
|
|
|
|
|
|
|
@end table
|
|
|
|
|
|
|
|
@c man end RESAMPLER OPTIONS
|
|
|
|
|
2012-12-17 23:39:13 +00:00
|
|
|
@chapter See Also
|
|
|
|
|
|
|
|
@ifhtml
|
|
|
|
@url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
|
2013-01-01 09:59:51 +00:00
|
|
|
@url{libswresample.html,libswresample}
|
2012-12-17 23:39:13 +00:00
|
|
|
@end ifhtml
|
|
|
|
|
|
|
|
@ifnothtml
|
|
|
|
ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libswresample(3)
|
|
|
|
@end ifnothtml
|
|
|
|
|
2012-12-16 17:04:37 +00:00
|
|
|
@include authors.texi
|
|
|
|
|
2012-11-02 11:24:04 +00:00
|
|
|
@ignore
|
|
|
|
|
|
|
|
@setfilename ffmpeg-resampler
|
|
|
|
@settitle FFmpeg Resampler
|
|
|
|
|
|
|
|
@end ignore
|
2012-12-16 17:04:37 +00:00
|
|
|
|
|
|
|
@bye
|