]> git.sesse.net Git - ffmpeg/blob - doc/ffmpeg-resampler.texi
Ensoniq Paris Audio File demuxer
[ffmpeg] / doc / ffmpeg-resampler.texi
1 \input texinfo @c -*- texinfo -*-
2
3 @settitle FFmpeg Resampler Documentation
4 @titlepage
5 @center @titlefont{FFmpeg Resampler Documentation}
6 @end titlepage
7
8 @top
9
10 @contents
11
12 @chapter Description
13 @c man begin DESCRIPTION
14
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.
19
20 @c man end DESCRIPTION
21
22 @chapter Resampler Options
23 @c man begin RESAMPLER OPTIONS
24
25 The audio resampler supports the following named options.
26
27 Options may be set by specifying -@var{option} @var{value} in the
28 FFmpeg tools, or by setting the value explicitly in the
29 @code{SwrContext} options or using the @file{libavutil/opt.h} API for
30 programmatic use.
31
32 @table @option
33
34 @item ich, in_channel_count
35 Set the number of input channels. Default value is 0. Setting this
36 value is not mandatory if the corresponding channel layout
37 @option{in_channel_layout} is set.
38
39 @item och, out_channel_count
40 Set the number of output channels. Default value is 0. Setting this
41 value is not mandatory if the corresponding channel layout
42 @option{out_channel_layout} is set.
43
44 @item uch, used_channel_count
45 Set the number of used channels. Default value is 0. This option is
46 only used for special remapping.
47
48 @item isr, in_sample_rate
49 Set the input sample rate. Default value is 0.
50
51 @item osr, out_sample_rate
52 Set the output sample rate. Default value is 0.
53
54 @item isf, in_sample_fmt
55 Specify the input sample format. It is set by default to @code{none}.
56
57 @item osf, out_sample_fmt
58 Specify the output sample format. It is set by default to @code{none}.
59
60 @item tsf, internal_sample_fmt
61 Set the internal sample format. Default value is @code{none}.
62
63 @item icl, in_channel_layout
64 Set the input channel layout.
65
66 @item ocl, out_channel_layout
67 Set the output channel layout.
68
69 @item clev, center_mix_level
70 Set center mix level. It is a value expressed in deciBel, and must be
71 inclusively included between -32 and +32.
72
73 @item slev, surround_mix_level
74 Set surround mix level. It is a value expressed in deciBel, and must
75 be inclusively included between -32 and +32.
76
77 @item lfe_mix_evel
78 Set LFE mix level.
79
80 @item rmvol, rematrix_volume
81 Set rematrix volume. Default value is 1.0.
82
83 @item flags, swr_flags
84 Set flags used by the converter. Default value is 0.
85
86 It supports the following individual flags:
87 @table @option
88 @item res
89 force resampling
90 @end table
91
92 @item dither_scale
93 Set the dither scale. Default value is 1.
94
95 @item dither_method
96 Set dither method. Default value is 0.
97
98 Supported values:
99 @table @samp
100 @item rectangular
101 select rectangular dither
102 @item triangular
103 select triangular dither
104 @item triangular_hp
105 select triangular dither with high pass
106 @end table
107
108 @item filter_size
109 Set resampling filter size, default value is 16.
110
111 @item phase_shift
112 Set resampling phase shift, default value is 10, must be included
113 between 0 and 30.
114
115 @item linear_interp
116 Use Linear Interpolation if set to 1, default value is 0.
117
118 @item cutoff
119 Set cutoff frequency ratio. Must be a float value between 0 and 1,
120 default value is 0.8.
121
122 @item min_comp
123 Set minimum difference between timestamps and audio data (in seconds)
124 below which no timestamp compensation of either kind is applied.
125 Default value is @code{FLT_MAX}.
126
127 @item min_hard_comp
128 Set minimum difference between timestamps and audio data (in seconds)
129 to trigger padding/trimming the data. Must be a non-negative double,
130 default value is 0.1.
131
132 @item comp_duration
133 Set duration (in seconds) over which data is stretched/squeezed to
134 make it match the timestamps. Must be a non-negative double float
135 value, default value is 1.0.
136
137 @item max_soft_comp
138 Set maximum factor by which data is stretched/squeezed to make it
139 match the timestamps. Must be a non-negative double float value,
140 default value is 0.
141
142 @item matrix_encoding
143 Select matrixed stereo encoding.
144
145 It accepts the following values:
146 @table @samp
147 @item none
148 select none
149 @item dolby
150 select Dolby
151 @item dplii
152 select Dolby Pro Logic II
153 @end table
154
155 Default value is @code{none}.
156
157 @item filter_type
158 Select resampling filter type. This only affects resampling
159 operations.
160
161 It accepts the following values:
162 @table @samp
163 @item cubic
164 select cubic
165 @item blackman_nuttall
166 select Blackman Nuttall Windowed Sinc
167 @item kaiser
168 select Kaiser Windowed Sinc
169 @end table
170
171 @item kaiser_beta
172 Set Kaiser Window Beta value. Must be an integer included between 2
173 and 16, default value is 9.
174
175 @end table
176
177 @c man end RESAMPLER OPTIONS
178
179 @ignore
180
181 @setfilename ffmpeg-resampler
182 @settitle FFmpeg Resampler
183
184 @c man begin SEEALSO
185 ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libswresample(3)
186 @c man end
187
188 @c man begin AUTHORS
189 See Git history (git://source.ffmpeg.org/ffmpeg)
190 @c man end
191
192 @end ignore