summaryrefslogtreecommitdiffstats
path: root/doc/ffmpeg-resampler.texi
blob: 35587720029517c79e5a4b8a5849daea174851e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
\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
FFmpeg tools, or by setting the value explicitly in the
@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
Specify the input sample format. It is set by default to @code{none}.

@item osf, out_sample_fmt
Specify the output sample format. It is set by default to @code{none}.

@item tsf, internal_sample_fmt
Set the internal sample format. Default value is @code{none}.

@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

@item filter_size
Set resampling filter size, default value is 16.

@item phase_shift
Set resampling phase shift, default value is 10, must be included
between 0 and 30.

@item linear_interp
Use Linear Interpolation if set to 1, default value is 0.

@item cutoff
Set cutoff frequency ratio. Must be a float value between 0 and 1,
default value is 0.8.

@item min_comp
Set minimum difference between timestamps and audio data (in seconds)
below which no timestamp compensation of either kind is applied.
Default value is @code{FLT_MAX}.

@item min_hard_comp
Set minimum difference between timestamps and audio data (in seconds)
to trigger padding/trimming the data. Must be a non-negative double,
default value is 0.1.

@item comp_duration
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.

@item max_soft_comp
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.

@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
Select resampling filter type. This only affects resampling
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
Set Kaiser Window Beta value. Must be an integer included between 2
and 16, default value is 9.

@end table

@c man end RESAMPLER OPTIONS

@ignore

@setfilename ffmpeg-resampler
@settitle FFmpeg Resampler

@c man begin SEEALSO
ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libswresample(3)
@c man end

@c man begin AUTHORS
See Git history (git://source.ffmpeg.org/ffmpeg)
@c man end

@end ignore
OpenPOWER on IntegriCloud