]> git.sesse.net Git - ffmpeg/blob - doc/ffmpeg-resampler.texi
Merge remote-tracking branch 'qatar/master'
[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. Must be an integer representing the
56 corresponding sample format specified in
57 @file{libavutil/samplefmt.h} header. Default value is -1
58 (corresponding to @code{AV_SAMPLE_FMT_NONE}).
59
60 @item osf, out_sample_fmt
61 Specify the output sample format. Must be an integer representing the
62 corresponding sample format specified in
63 @file{libavutil/samplefmt.h} header. Default value is -1
64 (corresponding to @code{AV_SAMPLE_FMT_NONE}).
65
66 @item tsf, internal_sample_fmt
67 Set the internal sample format. Default value is -1.
68
69 @item icl, in_channel_layout
70 Set the input channel layout.
71
72 @item ocl, out_channel_layout
73 Set the output channel layout.
74
75 @item clev, center_mix_level
76 Set center mix level. It is a value expressed in deciBel, and must be
77 inclusively included between -32 and +32.
78
79 @item slev, surround_mix_level
80 Set surround mix level. It is a value expressed in deciBel, and must
81 be inclusively included between -32 and +32.
82
83 @item lfe_mix_evel
84 Set LFE mix level.
85
86 @item rmvol, rematrix_volume
87 Set rematrix volume. Default value is 1.0.
88
89 @item flags, swr_flags
90 Set flags used by the converter. Default value is 0.
91
92 It supports the following individual flags:
93 @table @option
94 @item res
95 force resampling
96 @end table
97
98 @item dither_scale
99 Set the dither scale. Default value is 1.
100
101 @item dither_method
102 Set dither method. Default value is 0.
103
104 Supported values:
105 @table @samp
106 @item rectangular
107 select rectangular dither
108 @item triangular
109 select triangular dither
110 @item triangular_hp
111 select triangular dither with high pass
112 @end table
113
114 @item filter_size
115 Set resampling filter size, default value is 16.
116
117 @item phase_shift
118 Set resampling phase shift, default value is 10, must be included
119 between 0 and 30.
120
121 @item linear_interp
122 Use Linear Interpolation if set to 1, default value is 0.
123
124 @item cutoff
125 Set cutoff frequency ratio. Must be a float value between 0 and 1,
126 default value is 0.8.
127
128 @item min_comp
129 Set minimum difference between timestamps and audio data (in seconds)
130 below which no timestamp compensation of either kind is applied.
131 Default value is @code{FLT_MAX}.
132
133 @item min_hard_comp
134 Set minimum difference between timestamps and audio data (in seconds)
135 to trigger padding/trimming the data. Must be a non-negative double,
136 default value is 0.1.
137
138 @item comp_duration
139 Set duration (in seconds) over which data is stretched/squeezed to
140 make it match the timestamps. Must be a non-negative double float
141 value, default value is 1.0.
142
143 @item max_soft_comp
144 Set maximum factor by which data is stretched/squeezed to make it
145 match the timestamps. Must be a non-negative double float value,
146 default value is 0.
147
148 @item matrix_encoding
149 Select matrixed stereo encoding.
150
151 It accepts the following values:
152 @table @samp
153 @item none
154 select none
155 @item dolby
156 select Dolby
157 @item dplii
158 select Dolby Pro Logic II
159 @end table
160
161 Default value is @code{none}.
162
163 @item filter_type
164 Select resampling filter type. This only affects resampling
165 operations.
166
167 It accepts the following values:
168 @table @samp
169 @item cubic
170 select cubic
171 @item blackman_nuttall
172 select Blackman Nuttall Windowed Sinc
173 @item kaiser
174 select Kaiser Windowed Sinc
175 @end table
176
177 @item kaiser_beta
178 Set Kaiser Window Beta value. Must be an integer included between 2
179 and 16, default value is 9.
180
181 @end table
182
183 @c man end RESAMPLER OPTIONS
184
185 @ignore
186
187 @setfilename ffmpeg-resampler
188 @settitle FFmpeg Resampler
189
190 @c man begin SEEALSO
191 ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libswresample(3)
192 @c man end
193
194 @c man begin AUTHORS
195 See Git history (git://source.ffmpeg.org/ffmpeg)
196 @c man end
197
198 @end ignore