100
108
Below is a description of the currently available audio filters.
112
Convert the input audio to one of the specified formats. The framework will
113
negotiate the most appropriate format to minimize conversions.
115
The filter accepts the following named parameters:
119
A comma-separated list of requested sample formats.
122
A comma-separated list of requested sample rates.
124
@item channel_layouts
125
A comma-separated list of requested channel layouts.
129
If a parameter is omitted, all values are allowed.
131
For example to force the output to either unsigned 8-bit or signed 16-bit stereo:
133
aformat=sample_fmts\=u8\,s16:channel_layouts\=stereo
138
Mixes multiple audio inputs into a single output.
142
avconv -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
144
will mix 3 input audio streams to a single output with the same duration as the
145
first input and a dropout transition time of 3 seconds.
147
The filter accepts the following named parameters:
151
Number of inputs. If unspecified, it defaults to 2.
154
How to determine the end-of-stream.
158
Duration of longest input. (default)
161
Duration of shortest input.
164
Duration of first input.
168
@item dropout_transition
169
Transition time, in seconds, for volume renormalization when an input
170
stream ends. The default value is 2 seconds.
104
176
Pass the audio source unchanged to the output.
180
Show a line containing various information for each input audio frame.
181
The input audio is not modified.
183
The shown line contains a sequence of key/value pairs of the form
184
@var{key}:@var{value}.
186
A description of each shown parameter follows:
190
sequential number of the input frame, starting from 0
193
Presentation timestamp of the input frame, in time base units; the time base
194
depends on the filter input pad, and is usually 1/@var{sample_rate}.
197
presentation timestamp of the input frame in seconds
206
sample rate for the audio frame
209
number of samples (per channel) in the frame
212
Adler-32 checksum (printed in hexadecimal) of the audio data. For planar audio
213
the data is treated as if all the planes were concatenated.
215
@item plane_checksums
216
A list of Adler-32 checksums for each data plane.
221
Split input audio into several identical outputs.
223
The filter accepts a single parameter which specifies the number of outputs. If
224
unspecified, it defaults to 2.
228
avconv -i INPUT -filter_complex asplit=5 OUTPUT
230
will create 5 copies of the input audio.
233
Synchronize audio data with timestamps by squeezing/stretching it and/or
234
dropping samples/adding silence when needed.
236
The filter accepts the following named parameters:
240
Enable stretching/squeezing the data to make it match the timestamps. Disabled
241
by default. When disabled, time gaps are covered with silence.
244
Minimum difference between timestamps and audio data (in seconds) to trigger
245
adding/dropping samples. Default value is 0.1. If you get non-perfect sync with
246
this filter, try setting this parameter to 0.
249
Maximum compensation in samples per second. Relevant only with compensate=1.
253
Assume the first pts should be this value. The time base is 1 / sample rate.
254
This allows for padding/trimming at the start of stream. By default, no
255
assumption is made about the first frame's expected pts, so no padding or
256
trimming is done. For example, this could be set to 0 to pad the beginning with
257
silence if an audio stream starts after the video stream or to trim any samples
258
with a negative pts due to encoder delay.
262
@section channelsplit
263
Split each channel in input audio stream into a separate output stream.
265
This filter accepts the following named parameters:
268
Channel layout of the input stream. Default is "stereo".
271
For example, assuming a stereo input MP3 file
273
avconv -i in.mp3 -filter_complex channelsplit out.mkv
275
will create an output Matroska file with two audio streams, one containing only
276
the left channel and the other the right channel.
278
To split a 5.1 WAV file into per-channel files
280
avconv -i in.wav -filter_complex
281
'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
282
-map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
283
front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
288
Remap input channels to new locations.
290
This filter accepts the following named parameters:
293
Channel layout of the output stream.
296
Map channels from input to output. The argument is a comma-separated list of
297
mappings, each in the @code{@var{in_channel}-@var{out_channel}} or
298
@var{in_channel} form. @var{in_channel} can be either the name of the input
299
channel (e.g. FL for front left) or its index in the input channel layout.
300
@var{out_channel} is the name of the output channel or its index in the output
301
channel layout. If @var{out_channel} is not given then it is implicitly an
302
index, starting with zero and increasing by one for each mapping.
305
If no mapping is present, the filter will implicitly map input channels to
306
output channels preserving index.
308
For example, assuming a 5.1+downmix input MOV file
310
avconv -i in.mov -filter 'channelmap=map=DL-FL\,DR-FR' out.wav
312
will create an output WAV file tagged as stereo from the downmix channels of
315
To fix a 5.1 WAV improperly encoded in AAC's native channel order
317
avconv -i in.wav -filter 'channelmap=1\,2\,0\,5\,3\,4:channel_layout=5.1' out.wav
321
Join multiple input streams into one multi-channel stream.
323
The filter accepts the following named parameters:
327
Number of input streams. Defaults to 2.
330
Desired output channel layout. Defaults to stereo.
333
Map channels from inputs to output. The argument is a comma-separated list of
334
mappings, each in the @code{@var{input_idx}.@var{in_channel}-@var{out_channel}}
335
form. @var{input_idx} is the 0-based index of the input stream. @var{in_channel}
336
can be either the name of the input channel (e.g. FL for front left) or its
337
index in the specified input stream. @var{out_channel} is the name of the output
341
The filter will attempt to guess the mappings when those are not specified
342
explicitly. It does so by first trying to find an unused matching input channel
343
and if that fails it picks the first unused input channel.
345
E.g. to join 3 inputs (with properly set channel layouts)
347
avconv -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT
350
To build a 5.1 output from 6 single-channel streams:
352
avconv -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
353
'join=inputs=6:channel_layout=5.1:map=0.0-FL\,1.0-FR\,2.0-FC\,3.0-SL\,4.0-SR\,5.0-LFE'
358
Convert the audio sample format, sample rate and channel layout. This filter is
359
not meant to be used directly, it is inserted automatically by libavfilter
360
whenever conversion is needed. Use the @var{aformat} filter to force a specific
365
Adjust the input audio volume.
367
The filter accepts the following named parameters:
371
Expresses how the audio volume will be increased or decreased.
373
Output values are clipped to the maximum value.
375
The output audio volume is given by the relation:
377
@var{output_volume} = @var{volume} * @var{input_volume}
380
Default value for @var{volume} is 1.0.
383
Mathematical precision.
385
This determines which input sample formats will be allowed, which affects the
386
precision of the volume scaling.
390
8-bit fixed-point; limits input sample format to U8, S16, and S32.
392
32-bit floating-point; limits input sample format to FLT. (default)
394
64-bit floating-point; limits input sample format to DBL.
402
Halve the input audio volume:
406
volume=volume=-6.0206dB
410
Increase input audio power by 6 decibels using fixed-point precision:
412
volume=volume=6dB:precision=fixed
106
416
@c man end AUDIO FILTERS
108
418
@chapter Audio Sources