1 @chapter Filtering Introduction
2 @c man begin FILTERING INTRODUCTION
4 Filtering in FFmpeg is enabled through the libavfilter library.
6 In libavfilter, a filter can have multiple inputs and multiple
8 To illustrate the sorts of things that are possible, we consider the
13 input --> split ---------------------> overlay --> output
16 +-----> crop --> vflip -------+
19 This filtergraph splits the input stream in two streams, then sends one
20 stream through the crop filter and the vflip filter, before merging it
21 back with the other stream by overlaying it on top. You can use the
22 following command to achieve this:
25 ffmpeg -i INPUT -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" OUTPUT
28 The result will be that the top half of the video is mirrored
29 onto the bottom half of the output video.
31 Filters in the same linear chain are separated by commas, and distinct
32 linear chains of filters are separated by semicolons. In our example,
33 @var{crop,vflip} are in one linear chain, @var{split} and
34 @var{overlay} are separately in another. The points where the linear
35 chains join are labelled by names enclosed in square brackets. In the
36 example, the split filter generates two outputs that are associated to
37 the labels @var{[main]} and @var{[tmp]}.
39 The stream sent to the second output of @var{split}, labelled as
40 @var{[tmp]}, is processed through the @var{crop} filter, which crops
41 away the lower half part of the video, and then vertically flipped. The
42 @var{overlay} filter takes in input the first unchanged output of the
43 split filter (which was labelled as @var{[main]}), and overlay on its
44 lower half the output generated by the @var{crop,vflip} filterchain.
46 Some filters take in input a list of parameters: they are specified
47 after the filter name and an equal sign, and are separated from each other
50 There exist so-called @var{source filters} that do not have an
51 audio/video input, and @var{sink filters} that will not have audio/video
54 @c man end FILTERING INTRODUCTION
57 @c man begin GRAPH2DOT
59 The @file{graph2dot} program included in the FFmpeg @file{tools}
60 directory can be used to parse a filtergraph description and issue a
61 corresponding textual representation in the dot language.
68 to see how to use @file{graph2dot}.
70 You can then pass the dot description to the @file{dot} program (from
71 the graphviz suite of programs) and obtain a graphical representation
74 For example the sequence of commands:
76 echo @var{GRAPH_DESCRIPTION} | \
77 tools/graph2dot -o graph.tmp && \
78 dot -Tpng graph.tmp -o graph.png && \
82 can be used to create and display an image representing the graph
83 described by the @var{GRAPH_DESCRIPTION} string. Note that this string must be
84 a complete self-contained graph, with its inputs and outputs explicitly defined.
85 For example if your command line is of the form:
87 ffmpeg -i infile -vf scale=640:360 outfile
89 your @var{GRAPH_DESCRIPTION} string will need to be of the form:
91 nullsrc,scale=640:360,nullsink
93 you may also need to set the @var{nullsrc} parameters and add a @var{format}
94 filter in order to simulate a specific input file.
98 @chapter Filtergraph description
99 @c man begin FILTERGRAPH DESCRIPTION
101 A filtergraph is a directed graph of connected filters. It can contain
102 cycles, and there can be multiple links between a pair of
103 filters. Each link has one input pad on one side connecting it to one
104 filter from which it takes its input, and one output pad on the other
105 side connecting it to one filter accepting its output.
107 Each filter in a filtergraph is an instance of a filter class
108 registered in the application, which defines the features and the
109 number of input and output pads of the filter.
111 A filter with no input pads is called a "source", and a filter with no
112 output pads is called a "sink".
114 @anchor{Filtergraph syntax}
115 @section Filtergraph syntax
117 A filtergraph has a textual representation, which is recognized by the
118 @option{-filter}/@option{-vf}/@option{-af} and
119 @option{-filter_complex} options in @command{ffmpeg} and
120 @option{-vf}/@option{-af} in @command{ffplay}, and by the
121 @code{avfilter_graph_parse_ptr()} function defined in
122 @file{libavfilter/avfilter.h}.
124 A filterchain consists of a sequence of connected filters, each one
125 connected to the previous one in the sequence. A filterchain is
126 represented by a list of ","-separated filter descriptions.
128 A filtergraph consists of a sequence of filterchains. A sequence of
129 filterchains is represented by a list of ";"-separated filterchain
132 A filter is represented by a string of the form:
133 [@var{in_link_1}]...[@var{in_link_N}]@var{filter_name}@@@var{id}=@var{arguments}[@var{out_link_1}]...[@var{out_link_M}]
135 @var{filter_name} is the name of the filter class of which the
136 described filter is an instance of, and has to be the name of one of
137 the filter classes registered in the program optionally followed by "@@@var{id}".
138 The name of the filter class is optionally followed by a string
141 @var{arguments} is a string which contains the parameters used to
142 initialize the filter instance. It may have one of two forms:
146 A ':'-separated list of @var{key=value} pairs.
149 A ':'-separated list of @var{value}. In this case, the keys are assumed to be
150 the option names in the order they are declared. E.g. the @code{fade} filter
151 declares three options in this order -- @option{type}, @option{start_frame} and
152 @option{nb_frames}. Then the parameter list @var{in:0:30} means that the value
153 @var{in} is assigned to the option @option{type}, @var{0} to
154 @option{start_frame} and @var{30} to @option{nb_frames}.
157 A ':'-separated list of mixed direct @var{value} and long @var{key=value}
158 pairs. The direct @var{value} must precede the @var{key=value} pairs, and
159 follow the same constraints order of the previous point. The following
160 @var{key=value} pairs can be set in any preferred order.
164 If the option value itself is a list of items (e.g. the @code{format} filter
165 takes a list of pixel formats), the items in the list are usually separated by
168 The list of arguments can be quoted using the character @samp{'} as initial
169 and ending mark, and the character @samp{\} for escaping the characters
170 within the quoted text; otherwise the argument string is considered
171 terminated when the next special character (belonging to the set
172 @samp{[]=;,}) is encountered.
174 The name and arguments of the filter are optionally preceded and
175 followed by a list of link labels.
176 A link label allows one to name a link and associate it to a filter output
177 or input pad. The preceding labels @var{in_link_1}
178 ... @var{in_link_N}, are associated to the filter input pads,
179 the following labels @var{out_link_1} ... @var{out_link_M}, are
180 associated to the output pads.
182 When two link labels with the same name are found in the
183 filtergraph, a link between the corresponding input and output pad is
186 If an output pad is not labelled, it is linked by default to the first
187 unlabelled input pad of the next filter in the filterchain.
188 For example in the filterchain
190 nullsrc, split[L1], [L2]overlay, nullsink
192 the split filter instance has two output pads, and the overlay filter
193 instance two input pads. The first output pad of split is labelled
194 "L1", the first input pad of overlay is labelled "L2", and the second
195 output pad of split is linked to the second input pad of overlay,
196 which are both unlabelled.
198 In a filter description, if the input label of the first filter is not
199 specified, "in" is assumed; if the output label of the last filter is not
200 specified, "out" is assumed.
202 In a complete filterchain all the unlabelled filter input and output
203 pads must be connected. A filtergraph is considered valid if all the
204 filter input and output pads of all the filterchains are connected.
206 Libavfilter will automatically insert @ref{scale} filters where format
207 conversion is required. It is possible to specify swscale flags
208 for those automatically inserted scalers by prepending
209 @code{sws_flags=@var{flags};}
210 to the filtergraph description.
212 Here is a BNF description of the filtergraph syntax:
214 @var{NAME} ::= sequence of alphanumeric characters and '_'
215 @var{FILTER_NAME} ::= @var{NAME}["@@"@var{NAME}]
216 @var{LINKLABEL} ::= "[" @var{NAME} "]"
217 @var{LINKLABELS} ::= @var{LINKLABEL} [@var{LINKLABELS}]
218 @var{FILTER_ARGUMENTS} ::= sequence of chars (possibly quoted)
219 @var{FILTER} ::= [@var{LINKLABELS}] @var{FILTER_NAME} ["=" @var{FILTER_ARGUMENTS}] [@var{LINKLABELS}]
220 @var{FILTERCHAIN} ::= @var{FILTER} [,@var{FILTERCHAIN}]
221 @var{FILTERGRAPH} ::= [sws_flags=@var{flags};] @var{FILTERCHAIN} [;@var{FILTERGRAPH}]
224 @anchor{filtergraph escaping}
225 @section Notes on filtergraph escaping
227 Filtergraph description composition entails several levels of
228 escaping. See @ref{quoting_and_escaping,,the "Quoting and escaping"
229 section in the ffmpeg-utils(1) manual,ffmpeg-utils} for more
230 information about the employed escaping procedure.
232 A first level escaping affects the content of each filter option
233 value, which may contain the special character @code{:} used to
234 separate values, or one of the escaping characters @code{\'}.
236 A second level escaping affects the whole filter description, which
237 may contain the escaping characters @code{\'} or the special
238 characters @code{[],;} used by the filtergraph description.
240 Finally, when you specify a filtergraph on a shell commandline, you
241 need to perform a third level escaping for the shell special
242 characters contained within it.
244 For example, consider the following string to be embedded in
245 the @ref{drawtext} filter description @option{text} value:
247 this is a 'string': may contain one, or more, special characters
250 This string contains the @code{'} special escaping character, and the
251 @code{:} special character, so it needs to be escaped in this way:
253 text=this is a \'string\'\: may contain one, or more, special characters
256 A second level of escaping is required when embedding the filter
257 description in a filtergraph description, in order to escape all the
258 filtergraph special characters. Thus the example above becomes:
260 drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters
262 (note that in addition to the @code{\'} escaping special characters,
263 also @code{,} needs to be escaped).
265 Finally an additional level of escaping is needed when writing the
266 filtergraph description in a shell command, which depends on the
267 escaping rules of the adopted shell. For example, assuming that
268 @code{\} is special and needs to be escaped with another @code{\}, the
269 previous string will finally result in:
271 -vf "drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters"
274 @chapter Timeline editing
276 Some filters support a generic @option{enable} option. For the filters
277 supporting timeline editing, this option can be set to an expression which is
278 evaluated before sending a frame to the filter. If the evaluation is non-zero,
279 the filter will be enabled, otherwise the frame will be sent unchanged to the
280 next filter in the filtergraph.
282 The expression accepts the following values:
285 timestamp expressed in seconds, NAN if the input timestamp is unknown
288 sequential number of the input frame, starting from 0
291 the position in the file of the input frame, NAN if unknown
295 width and height of the input frame if video
298 Additionally, these filters support an @option{enable} command that can be used
299 to re-define the expression.
301 Like any other filtering option, the @option{enable} option follows the same
304 For example, to enable a blur filter (@ref{smartblur}) from 10 seconds to 3
305 minutes, and a @ref{curves} filter starting at 3 seconds:
307 smartblur = enable='between(t,10,3*60)',
308 curves = enable='gte(t,3)' : preset=cross_process
311 See @code{ffmpeg -filters} to view which filters have timeline support.
313 @c man end FILTERGRAPH DESCRIPTION
316 @chapter Changing options at runtime with a command
318 Some options can be changed during the operation of the filter using
319 a command. These options are marked 'T' on the output of
320 @command{ffmpeg} @option{-h filter=<name of filter>}.
321 The name of the command is the name of the option and the argument is
325 @chapter Options for filters with several inputs (framesync)
326 @c man begin OPTIONS FOR FILTERS WITH SEVERAL INPUTS
328 Some filters with several inputs support a common set of options.
329 These options can only be set by name, not with the short notation.
333 The action to take when EOF is encountered on the secondary input; it accepts
334 one of the following values:
338 Repeat the last frame (the default).
342 Pass the main input through.
346 If set to 1, force the output to terminate when the shortest input
347 terminates. Default value is 0.
350 If set to 1, force the filter to extend the last frame of secondary streams
351 until the end of the primary stream. A value of 0 disables this behavior.
355 @c man end OPTIONS FOR FILTERS WITH SEVERAL INPUTS
357 @chapter Audio Filters
358 @c man begin AUDIO FILTERS
360 When you configure your FFmpeg build, you can disable any of the
361 existing filters using @code{--disable-filters}.
362 The configure output will show the audio filters included in your
365 Below is a description of the currently available audio filters.
369 A compressor is mainly used to reduce the dynamic range of a signal.
370 Especially modern music is mostly compressed at a high ratio to
371 improve the overall loudness. It's done to get the highest attention
372 of a listener, "fatten" the sound and bring more "power" to the track.
373 If a signal is compressed too much it may sound dull or "dead"
374 afterwards or it may start to "pump" (which could be a powerful effect
375 but can also destroy a track completely).
376 The right compression is the key to reach a professional sound and is
377 the high art of mixing and mastering. Because of its complex settings
378 it may take a long time to get the right feeling for this kind of effect.
380 Compression is done by detecting the volume above a chosen level
381 @code{threshold} and dividing it by the factor set with @code{ratio}.
382 So if you set the threshold to -12dB and your signal reaches -6dB a ratio
383 of 2:1 will result in a signal at -9dB. Because an exact manipulation of
384 the signal would cause distortion of the waveform the reduction can be
385 levelled over the time. This is done by setting "Attack" and "Release".
386 @code{attack} determines how long the signal has to rise above the threshold
387 before any reduction will occur and @code{release} sets the time the signal
388 has to fall below the threshold to reduce the reduction again. Shorter signals
389 than the chosen attack time will be left untouched.
390 The overall reduction of the signal can be made up afterwards with the
391 @code{makeup} setting. So compressing the peaks of a signal about 6dB and
392 raising the makeup to this level results in a signal twice as loud than the
393 source. To gain a softer entry in the compression the @code{knee} flattens the
394 hard edge at the threshold in the range of the chosen decibels.
396 The filter accepts the following options:
400 Set input gain. Default is 1. Range is between 0.015625 and 64.
403 Set mode of compressor operation. Can be @code{upward} or @code{downward}.
404 Default is @code{downward}.
407 If a signal of stream rises above this level it will affect the gain
409 By default it is 0.125. Range is between 0.00097563 and 1.
412 Set a ratio by which the signal is reduced. 1:2 means that if the level
413 rose 4dB above the threshold, it will be only 2dB above after the reduction.
414 Default is 2. Range is between 1 and 20.
417 Amount of milliseconds the signal has to rise above the threshold before gain
418 reduction starts. Default is 20. Range is between 0.01 and 2000.
421 Amount of milliseconds the signal has to fall below the threshold before
422 reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
425 Set the amount by how much signal will be amplified after processing.
426 Default is 1. Range is from 1 to 64.
429 Curve the sharp knee around the threshold to enter gain reduction more softly.
430 Default is 2.82843. Range is between 1 and 8.
433 Choose if the @code{average} level between all channels of input stream
434 or the louder(@code{maximum}) channel of input stream affects the
435 reduction. Default is @code{average}.
438 Should the exact signal be taken in case of @code{peak} or an RMS one in case
439 of @code{rms}. Default is @code{rms} which is mostly smoother.
442 How much to use compressed signal in output. Default is 1.
443 Range is between 0 and 1.
448 This filter supports the all above options as @ref{commands}.
451 Simple audio dynamic range compression/expansion filter.
453 The filter accepts the following options:
457 Set contrast. Default is 33. Allowed range is between 0 and 100.
462 Copy the input audio source unchanged to the output. This is mainly useful for
467 Apply cross fade from one input audio stream to another input audio stream.
468 The cross fade is applied for specified duration near the end of first stream.
470 The filter accepts the following options:
474 Specify the number of samples for which the cross fade effect has to last.
475 At the end of the cross fade effect the first input audio will be completely
476 silent. Default is 44100.
479 Specify the duration of the cross fade effect. See
480 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
481 for the accepted syntax.
482 By default the duration is determined by @var{nb_samples}.
483 If set this option is used instead of @var{nb_samples}.
486 Should first stream end overlap with second stream start. Default is enabled.
489 Set curve for cross fade transition for first stream.
492 Set curve for cross fade transition for second stream.
494 For description of available curve types see @ref{afade} filter description.
501 Cross fade from one input to another:
503 ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:c1=exp:c2=exp output.flac
507 Cross fade from one input to another but without overlapping:
509 ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c2=exp output.flac
514 Split audio stream into several bands.
516 This filter splits audio stream into two or more frequency ranges.
517 Summing all streams back will give flat output.
519 The filter accepts the following options:
523 Set split frequencies. Those must be positive and increasing.
526 Set filter order, can be @var{2nd}, @var{4th} or @var{8th}.
527 Default is @var{4th}.
532 Reduce audio bit resolution.
534 This filter is bit crusher with enhanced functionality. A bit crusher
535 is used to audibly reduce number of bits an audio signal is sampled
536 with. This doesn't change the bit depth at all, it just produces the
537 effect. Material reduced in bit depth sounds more harsh and "digital".
538 This filter is able to even round to continuous values instead of discrete
540 Additionally it has a D/C offset which results in different crushing of
541 the lower and the upper half of the signal.
542 An Anti-Aliasing setting is able to produce "softer" crushing sounds.
544 Another feature of this filter is the logarithmic mode.
545 This setting switches from linear distances between bits to logarithmic ones.
546 The result is a much more "natural" sounding crusher which doesn't gate low
547 signals for example. The human ear has a logarithmic perception,
548 so this kind of crushing is much more pleasant.
549 Logarithmic crushing is also able to get anti-aliased.
551 The filter accepts the following options:
567 Can be linear: @code{lin} or logarithmic: @code{log}.
576 Set sample reduction.
579 Enable LFO. By default disabled.
590 Delay audio filtering until a given wallclock timestamp. See the @ref{cue}
594 Remove impulsive noise from input audio.
596 Samples detected as impulsive noise are replaced by interpolated samples using
597 autoregressive modelling.
601 Set window size, in milliseconds. Allowed range is from @code{10} to
602 @code{100}. Default value is @code{55} milliseconds.
603 This sets size of window which will be processed at once.
606 Set window overlap, in percentage of window size. Allowed range is from
607 @code{50} to @code{95}. Default value is @code{75} percent.
608 Setting this to a very high value increases impulsive noise removal but makes
609 whole process much slower.
612 Set autoregression order, in percentage of window size. Allowed range is from
613 @code{0} to @code{25}. Default value is @code{2} percent. This option also
614 controls quality of interpolated samples using neighbour good samples.
617 Set threshold value. Allowed range is from @code{1} to @code{100}.
618 Default value is @code{2}.
619 This controls the strength of impulsive noise which is going to be removed.
620 The lower value, the more samples will be detected as impulsive noise.
623 Set burst fusion, in percentage of window size. Allowed range is @code{0} to
624 @code{10}. Default value is @code{2}.
625 If any two samples detected as noise are spaced less than this value then any
626 sample between those two samples will be also detected as noise.
631 It accepts the following values:
634 Select overlap-add method. Even not interpolated samples are slightly
635 changed with this method.
638 Select overlap-save method. Not interpolated samples remain unchanged.
641 Default value is @code{a}.
645 Remove clipped samples from input audio.
647 Samples detected as clipped are replaced by interpolated samples using
648 autoregressive modelling.
652 Set window size, in milliseconds. Allowed range is from @code{10} to @code{100}.
653 Default value is @code{55} milliseconds.
654 This sets size of window which will be processed at once.
657 Set window overlap, in percentage of window size. Allowed range is from @code{50}
658 to @code{95}. Default value is @code{75} percent.
661 Set autoregression order, in percentage of window size. Allowed range is from
662 @code{0} to @code{25}. Default value is @code{8} percent. This option also controls
663 quality of interpolated samples using neighbour good samples.
666 Set threshold value. Allowed range is from @code{1} to @code{100}.
667 Default value is @code{10}. Higher values make clip detection less aggressive.
670 Set size of histogram used to detect clips. Allowed range is from @code{100} to @code{9999}.
671 Default value is @code{1000}. Higher values make clip detection less aggressive.
676 It accepts the following values:
679 Select overlap-add method. Even not interpolated samples are slightly changed
683 Select overlap-save method. Not interpolated samples remain unchanged.
686 Default value is @code{a}.
691 Delay one or more audio channels.
693 Samples in delayed channel are filled with silence.
695 The filter accepts the following option:
699 Set list of delays in milliseconds for each channel separated by '|'.
700 Unused delays will be silently ignored. If number of given delays is
701 smaller than number of channels all remaining channels will not be delayed.
702 If you want to delay exact number of samples, append 'S' to number.
703 If you want instead to delay in seconds, append 's' to number.
706 Use last set delay for all remaining channels. By default is disabled.
707 This option if enabled changes how option @code{delays} is interpreted.
714 Delay first channel by 1.5 seconds, the third channel by 0.5 seconds and leave
715 the second channel (and any other channels that may be present) unchanged.
721 Delay second channel by 500 samples, the third channel by 700 samples and leave
722 the first channel (and any other channels that may be present) unchanged.
728 Delay all channels by same number of samples:
730 adelay=delays=64S:all=1
735 Remedy denormals in audio by adding extremely low-level noise.
737 A description of the accepted parameters follows.
741 Set level of added noise in dB. Default is @code{-351}.
742 Allowed range is from -451 to -90.
745 Set type of added noise.
758 Default is @code{dc}.
761 @section aderivative, aintegral
763 Compute derivative/integral of audio stream.
765 Applying both filters one after another produces original audio.
769 Apply echoing to the input audio.
771 Echoes are reflected sound and can occur naturally amongst mountains
772 (and sometimes large buildings) when talking or shouting; digital echo
773 effects emulate this behaviour and are often used to help fill out the
774 sound of a single instrument or vocal. The time difference between the
775 original signal and the reflection is the @code{delay}, and the
776 loudness of the reflected signal is the @code{decay}.
777 Multiple echoes can have different delays and decays.
779 A description of the accepted parameters follows.
783 Set input gain of reflected signal. Default is @code{0.6}.
786 Set output gain of reflected signal. Default is @code{0.3}.
789 Set list of time intervals in milliseconds between original signal and reflections
790 separated by '|'. Allowed range for each @code{delay} is @code{(0 - 90000.0]}.
791 Default is @code{1000}.
794 Set list of loudness of reflected signals separated by '|'.
795 Allowed range for each @code{decay} is @code{(0 - 1.0]}.
796 Default is @code{0.5}.
803 Make it sound as if there are twice as many instruments as are actually playing:
805 aecho=0.8:0.88:60:0.4
809 If delay is very short, then it sounds like a (metallic) robot playing music:
815 A longer delay will sound like an open air concert in the mountains:
817 aecho=0.8:0.9:1000:0.3
821 Same as above but with one more mountain:
823 aecho=0.8:0.9:1000|1800:0.3|0.25
828 Audio emphasis filter creates or restores material directly taken from LPs or
829 emphased CDs with different filter curves. E.g. to store music on vinyl the
830 signal has to be altered by a filter first to even out the disadvantages of
831 this recording medium.
832 Once the material is played back the inverse filter has to be applied to
833 restore the distortion of the frequency response.
835 The filter accepts the following options:
845 Set filter mode. For restoring material use @code{reproduction} mode, otherwise
846 use @code{production} mode. Default is @code{reproduction} mode.
849 Set filter type. Selects medium. Can be one of the following:
861 select Compact Disc (CD).
867 select 50µs (FM-KF).
869 select 75µs (FM-KF).
875 Modify an audio signal according to the specified expressions.
877 This filter accepts one or more expressions (one for each channel),
878 which are evaluated and used to modify a corresponding audio signal.
880 It accepts the following parameters:
884 Set the '|'-separated expressions list for each separate channel. If
885 the number of input channels is greater than the number of
886 expressions, the last specified expression is used for the remaining
889 @item channel_layout, c
890 Set output channel layout. If not specified, the channel layout is
891 specified by the number of expressions. If set to @samp{same}, it will
892 use by default the same input channel layout.
895 Each expression in @var{exprs} can contain the following constants and functions:
899 channel number of the current expression
902 number of the evaluated sample, starting from 0
908 time of the evaluated sample expressed in seconds
911 @item nb_out_channels
912 input and output number of channels
915 the value of input channel with number @var{CH}
918 Note: this filter is slow. For faster processing you should use a
927 aeval=val(ch)/2:c=same
931 Invert phase of the second channel:
940 Apply fade-in/out effect to input audio.
942 A description of the accepted parameters follows.
946 Specify the effect type, can be either @code{in} for fade-in, or
947 @code{out} for a fade-out effect. Default is @code{in}.
949 @item start_sample, ss
950 Specify the number of the start sample for starting to apply the fade
951 effect. Default is 0.
954 Specify the number of samples for which the fade effect has to last. At
955 the end of the fade-in effect the output audio will have the same
956 volume as the input audio, at the end of the fade-out transition
957 the output audio will be silence. Default is 44100.
960 Specify the start time of the fade effect. Default is 0.
961 The value must be specified as a time duration; see
962 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
963 for the accepted syntax.
964 If set this option is used instead of @var{start_sample}.
967 Specify the duration of the fade effect. See
968 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
969 for the accepted syntax.
970 At the end of the fade-in effect the output audio will have the same
971 volume as the input audio, at the end of the fade-out transition
972 the output audio will be silence.
973 By default the duration is determined by @var{nb_samples}.
974 If set this option is used instead of @var{nb_samples}.
977 Set curve for fade transition.
979 It accepts the following values:
982 select triangular, linear slope (default)
984 select quarter of sine wave
986 select half of sine wave
988 select exponential sine wave
992 select inverted parabola
1006 select inverted quarter of sine wave
1008 select inverted half of sine wave
1010 select double-exponential seat
1012 select double-exponential sigmoid
1014 select logistic sigmoid
1016 select sine cardinal function
1018 select inverted sine cardinal function
1024 @subsection Examples
1028 Fade in first 15 seconds of audio:
1030 afade=t=in:ss=0:d=15
1034 Fade out last 25 seconds of a 900 seconds audio:
1036 afade=t=out:st=875:d=25
1041 Denoise audio samples with FFT.
1043 A description of the accepted parameters follows.
1047 Set the noise reduction in dB, allowed range is 0.01 to 97.
1048 Default value is 12 dB.
1051 Set the noise floor in dB, allowed range is -80 to -20.
1052 Default value is -50 dB.
1057 It accepts the following values:
1066 Select shellac noise.
1069 Select custom noise, defined in @code{bn} option.
1071 Default value is white noise.
1075 Set custom band noise for every one of 15 bands.
1076 Bands are separated by ' ' or '|'.
1079 Set the residual floor in dB, allowed range is -80 to -20.
1080 Default value is -38 dB.
1083 Enable noise tracking. By default is disabled.
1084 With this enabled, noise floor is automatically adjusted.
1087 Enable residual tracking. By default is disabled.
1090 Set the output mode.
1092 It accepts the following values:
1095 Pass input unchanged.
1098 Pass noise filtered out.
1103 Default value is @var{o}.
1107 @subsection Commands
1109 This filter supports the following commands:
1111 @item sample_noise, sn
1112 Start or stop measuring noise profile.
1113 Syntax for the command is : "start" or "stop" string.
1114 After measuring noise profile is stopped it will be
1115 automatically applied in filtering.
1117 @item noise_reduction, nr
1118 Change noise reduction. Argument is single float number.
1119 Syntax for the command is : "@var{noise_reduction}"
1121 @item noise_floor, nf
1122 Change noise floor. Argument is single float number.
1123 Syntax for the command is : "@var{noise_floor}"
1125 @item output_mode, om
1126 Change output mode operation.
1127 Syntax for the command is : "i", "o" or "n" string.
1131 Apply arbitrary expressions to samples in frequency domain.
1135 Set frequency domain real expression for each separate channel separated
1136 by '|'. Default is "re".
1137 If the number of input channels is greater than the number of
1138 expressions, the last specified expression is used for the remaining
1142 Set frequency domain imaginary expression for each separate channel
1143 separated by '|'. Default is "im".
1145 Each expression in @var{real} and @var{imag} can contain the following
1146 constants and functions:
1153 current frequency bin number
1156 number of available bins
1159 channel number of the current expression
1168 current real part of frequency bin of current channel
1171 current imaginary part of frequency bin of current channel
1174 Return the value of real part of frequency bin at location (@var{bin},@var{channel})
1177 Return the value of imaginary part of frequency bin at location (@var{bin},@var{channel})
1181 Set window size. Allowed range is from 16 to 131072.
1182 Default is @code{4096}
1185 Set window function. Default is @code{hann}.
1188 Set window overlap. If set to 1, the recommended overlap for selected
1189 window function will be picked. Default is @code{0.75}.
1192 @subsection Examples
1196 Leave almost only low frequencies in audio:
1198 afftfilt="'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'"
1202 Apply robotize effect:
1204 afftfilt="real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75"
1208 Apply whisper effect:
1210 afftfilt="real='hypot(re,im)*cos((random(0)*2-1)*2*3.14)':imag='hypot(re,im)*sin((random(1)*2-1)*2*3.14)':win_size=128:overlap=0.8"
1217 Apply an arbitrary Finite Impulse Response filter.
1219 This filter is designed for applying long FIR filters,
1220 up to 60 seconds long.
1222 It can be used as component for digital crossover filters,
1223 room equalization, cross talk cancellation, wavefield synthesis,
1224 auralization, ambiophonics, ambisonics and spatialization.
1226 This filter uses the streams higher than first one as FIR coefficients.
1227 If the non-first stream holds a single channel, it will be used
1228 for all input channels in the first stream, otherwise
1229 the number of channels in the non-first stream must be same as
1230 the number of channels in the first stream.
1232 It accepts the following parameters:
1236 Set dry gain. This sets input gain.
1239 Set wet gain. This sets final output gain.
1242 Set Impulse Response filter length. Default is 1, which means whole IR is processed.
1245 Enable applying gain measured from power of IR.
1247 Set which approach to use for auto gain measurement.
1251 Do not apply any gain.
1254 select peak gain, very conservative approach. This is default value.
1257 select DC gain, limited application.
1260 select gain to noise approach, this is most popular one.
1264 Set gain to be applied to IR coefficients before filtering.
1265 Allowed range is 0 to 1. This gain is applied after any gain applied with @var{gtype} option.
1268 Set format of IR stream. Can be @code{mono} or @code{input}.
1269 Default is @code{input}.
1272 Set max allowed Impulse Response filter duration in seconds. Default is 30 seconds.
1273 Allowed range is 0.1 to 60 seconds.
1276 Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream.
1277 By default it is disabled.
1280 Set for which IR channel to display frequency response. By default is first channel
1281 displayed. This option is used only when @var{response} is enabled.
1284 Set video stream size. This option is used only when @var{response} is enabled.
1287 Set video stream frame rate. This option is used only when @var{response} is enabled.
1290 Set minimal partition size used for convolution. Default is @var{8192}.
1291 Allowed range is from @var{1} to @var{32768}.
1292 Lower values decreases latency at cost of higher CPU usage.
1295 Set maximal partition size used for convolution. Default is @var{8192}.
1296 Allowed range is from @var{8} to @var{32768}.
1297 Lower values may increase CPU usage.
1300 Set number of input impulse responses streams which will be switchable at runtime.
1301 Allowed range is from @var{1} to @var{32}. Default is @var{1}.
1304 Set IR stream which will be used for convolution, starting from @var{0}, should always be
1305 lower than supplied value by @code{nbirs} option. Default is @var{0}.
1306 This option can be changed at runtime via @ref{commands}.
1309 @subsection Examples
1313 Apply reverb to stream using mono IR file as second input, complete command using ffmpeg:
1315 ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav
1322 Set output format constraints for the input audio. The framework will
1323 negotiate the most appropriate format to minimize conversions.
1325 It accepts the following parameters:
1328 @item sample_fmts, f
1329 A '|'-separated list of requested sample formats.
1331 @item sample_rates, r
1332 A '|'-separated list of requested sample rates.
1334 @item channel_layouts, cl
1335 A '|'-separated list of requested channel layouts.
1337 See @ref{channel layout syntax,,the Channel Layout section in the ffmpeg-utils(1) manual,ffmpeg-utils}
1338 for the required syntax.
1341 If a parameter is omitted, all values are allowed.
1343 Force the output to either unsigned 8-bit or signed 16-bit stereo
1345 aformat=sample_fmts=u8|s16:channel_layouts=stereo
1349 Apply frequency shift to input audio samples.
1351 The filter accepts the following options:
1355 Specify frequency shift. Allowed range is -INT_MAX to INT_MAX.
1356 Default value is 0.0.
1359 @subsection Commands
1361 This filter supports the above option as @ref{commands}.
1365 A gate is mainly used to reduce lower parts of a signal. This kind of signal
1366 processing reduces disturbing noise between useful signals.
1368 Gating is done by detecting the volume below a chosen level @var{threshold}
1369 and dividing it by the factor set with @var{ratio}. The bottom of the noise
1370 floor is set via @var{range}. Because an exact manipulation of the signal
1371 would cause distortion of the waveform the reduction can be levelled over
1372 time. This is done by setting @var{attack} and @var{release}.
1374 @var{attack} determines how long the signal has to fall below the threshold
1375 before any reduction will occur and @var{release} sets the time the signal
1376 has to rise above the threshold to reduce the reduction again.
1377 Shorter signals than the chosen attack time will be left untouched.
1381 Set input level before filtering.
1382 Default is 1. Allowed range is from 0.015625 to 64.
1385 Set the mode of operation. Can be @code{upward} or @code{downward}.
1386 Default is @code{downward}. If set to @code{upward} mode, higher parts of signal
1387 will be amplified, expanding dynamic range in upward direction.
1388 Otherwise, in case of @code{downward} lower parts of signal will be reduced.
1391 Set the level of gain reduction when the signal is below the threshold.
1392 Default is 0.06125. Allowed range is from 0 to 1.
1393 Setting this to 0 disables reduction and then filter behaves like expander.
1396 If a signal rises above this level the gain reduction is released.
1397 Default is 0.125. Allowed range is from 0 to 1.
1400 Set a ratio by which the signal is reduced.
1401 Default is 2. Allowed range is from 1 to 9000.
1404 Amount of milliseconds the signal has to rise above the threshold before gain
1406 Default is 20 milliseconds. Allowed range is from 0.01 to 9000.
1409 Amount of milliseconds the signal has to fall below the threshold before the
1410 reduction is increased again. Default is 250 milliseconds.
1411 Allowed range is from 0.01 to 9000.
1414 Set amount of amplification of signal after processing.
1415 Default is 1. Allowed range is from 1 to 64.
1418 Curve the sharp knee around the threshold to enter gain reduction more softly.
1419 Default is 2.828427125. Allowed range is from 1 to 8.
1422 Choose if exact signal should be taken for detection or an RMS like one.
1423 Default is @code{rms}. Can be @code{peak} or @code{rms}.
1426 Choose if the average level between all channels or the louder channel affects
1428 Default is @code{average}. Can be @code{average} or @code{maximum}.
1433 Apply an arbitrary Infinite Impulse Response filter.
1435 It accepts the following parameters:
1439 Set numerator/zeros coefficients.
1442 Set denominator/poles coefficients.
1454 Set coefficients format.
1458 analog transfer function
1460 digital transfer function
1462 Z-plane zeros/poles, cartesian (default)
1464 Z-plane zeros/poles, polar radians
1466 Z-plane zeros/poles, polar degrees
1472 Set type of processing.
1484 Set filtering precision.
1488 double-precision floating-point (default)
1490 single-precision floating-point
1498 Normalize filter coefficients, by default is enabled.
1499 Enabling it will normalize magnitude response at DC to 0dB.
1502 How much to use filtered signal in output. Default is 1.
1503 Range is between 0 and 1.
1506 Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream.
1507 By default it is disabled.
1510 Set for which IR channel to display frequency response. By default is first channel
1511 displayed. This option is used only when @var{response} is enabled.
1514 Set video stream size. This option is used only when @var{response} is enabled.
1517 Coefficients in @code{tf} and @code{sf} format are separated by spaces and are in ascending
1520 Coefficients in @code{zp} format are separated by spaces and order of coefficients
1521 doesn't matter. Coefficients in @code{zp} format are complex numbers with @var{i}
1524 Different coefficients and gains can be provided for every channel, in such case
1525 use '|' to separate coefficients or gains. Last provided coefficients will be
1526 used for all remaining channels.
1528 @subsection Examples
1532 Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample rate:
1534 aiir=k=1:z=7.957584807809675810E-1 -2.575128568908332300 3.674839853930788710 -2.57512875289799137 7.957586296317130880E-1:p=1 -2.86950072432325953 3.63022088054647218 -2.28075678147272232 6.361362326477423500E-1:f=tf:r=d
1538 Same as above but in @code{zp} format:
1540 aiir=k=0.79575848078096756:z=0.80918701+0.58773007i 0.80918701-0.58773007i 0.80884700+0.58784055i 0.80884700-0.58784055i:p=0.63892345+0.59951235i 0.63892345-0.59951235i 0.79582691+0.44198673i 0.79582691-0.44198673i:f=zp:r=s
1544 Apply 3-rd order analog normalized Butterworth low-pass filter, using analog transfer function format:
1546 aiir=z=1.3057 0 0 0:p=1.3057 2.3892 2.1860 1:f=sf:r=d
1552 The limiter prevents an input signal from rising over a desired threshold.
1553 This limiter uses lookahead technology to prevent your signal from distorting.
1554 It means that there is a small delay after the signal is processed. Keep in mind
1555 that the delay it produces is the attack time you set.
1557 The filter accepts the following options:
1561 Set input gain. Default is 1.
1564 Set output gain. Default is 1.
1567 Don't let signals above this level pass the limiter. Default is 1.
1570 The limiter will reach its attenuation level in this amount of time in
1571 milliseconds. Default is 5 milliseconds.
1574 Come back from limiting to attenuation 1.0 in this amount of milliseconds.
1575 Default is 50 milliseconds.
1578 When gain reduction is always needed ASC takes care of releasing to an
1579 average reduction level rather than reaching a reduction of 0 in the release
1583 Select how much the release time is affected by ASC, 0 means nearly no changes
1584 in release time while 1 produces higher release times.
1587 Auto level output signal. Default is enabled.
1588 This normalizes audio back to 0dB if enabled.
1591 Depending on picked setting it is recommended to upsample input 2x or 4x times
1592 with @ref{aresample} before applying this filter.
1596 Apply a two-pole all-pass filter with central frequency (in Hz)
1597 @var{frequency}, and filter-width @var{width}.
1598 An all-pass filter changes the audio's frequency to phase relationship
1599 without changing its frequency to amplitude relationship.
1601 The filter accepts the following options:
1605 Set frequency in Hz.
1608 Set method to specify band-width of filter.
1623 Specify the band-width of a filter in width_type units.
1626 How much to use filtered signal in output. Default is 1.
1627 Range is between 0 and 1.
1630 Specify which channels to filter, by default all available are filtered.
1633 Normalize biquad coefficients, by default is disabled.
1634 Enabling it will normalize magnitude response at DC to 0dB.
1637 Set the filter order, can be 1 or 2. Default is 2.
1640 Set transform type of IIR filter.
1649 @subsection Commands
1651 This filter supports the following commands:
1654 Change allpass frequency.
1655 Syntax for the command is : "@var{frequency}"
1658 Change allpass width_type.
1659 Syntax for the command is : "@var{width_type}"
1662 Change allpass width.
1663 Syntax for the command is : "@var{width}"
1667 Syntax for the command is : "@var{mix}"
1674 The filter accepts the following options:
1678 Set the number of loops. Setting this value to -1 will result in infinite loops.
1682 Set maximal number of samples. Default is 0.
1685 Set first sample of loop. Default is 0.
1691 Merge two or more audio streams into a single multi-channel stream.
1693 The filter accepts the following options:
1698 Set the number of inputs. Default is 2.
1702 If the channel layouts of the inputs are disjoint, and therefore compatible,
1703 the channel layout of the output will be set accordingly and the channels
1704 will be reordered as necessary. If the channel layouts of the inputs are not
1705 disjoint, the output will have all the channels of the first input then all
1706 the channels of the second input, in that order, and the channel layout of
1707 the output will be the default value corresponding to the total number of
1710 For example, if the first input is in 2.1 (FL+FR+LF) and the second input
1711 is FC+BL+BR, then the output will be in 5.1, with the channels in the
1712 following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of the
1713 first input, b1 is the first channel of the second input).
1715 On the other hand, if both input are in stereo, the output channels will be
1716 in the default order: a1, a2, b1, b2, and the channel layout will be
1717 arbitrarily set to 4.0, which may or may not be the expected value.
1719 All inputs must have the same sample rate, and format.
1721 If inputs do not have the same duration, the output will stop with the
1724 @subsection Examples
1728 Merge two mono files into a stereo stream:
1730 amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
1734 Multiple merges assuming 1 video stream and 6 audio streams in @file{input.mkv}:
1736 ffmpeg -i input.mkv -filter_complex "[0:1][0:2][0:3][0:4][0:5][0:6] amerge=inputs=6" -c:a pcm_s16le output.mkv
1742 Mixes multiple audio inputs into a single output.
1744 Note that this filter only supports float samples (the @var{amerge}
1745 and @var{pan} audio filters support many formats). If the @var{amix}
1746 input has integer samples then @ref{aresample} will be automatically
1747 inserted to perform the conversion to float samples.
1751 ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
1753 will mix 3 input audio streams to a single output with the same duration as the
1754 first input and a dropout transition time of 3 seconds.
1756 It accepts the following parameters:
1760 The number of inputs. If unspecified, it defaults to 2.
1763 How to determine the end-of-stream.
1767 The duration of the longest input. (default)
1770 The duration of the shortest input.
1773 The duration of the first input.
1777 @item dropout_transition
1778 The transition time, in seconds, for volume renormalization when an input
1779 stream ends. The default value is 2 seconds.
1782 Specify weight of each input audio stream as sequence.
1783 Each weight is separated by space. By default all inputs have same weight.
1786 @subsection Commands
1788 This filter supports the following commands:
1791 Syntax is same as option with same name.
1796 Multiply first audio stream with second audio stream and store result
1797 in output audio stream. Multiplication is done by multiplying each
1798 sample from first stream with sample at same position from second stream.
1800 With this element-wise multiplication one can create amplitude fades and
1801 amplitude modulations.
1803 @section anequalizer
1805 High-order parametric multiband equalizer for each channel.
1807 It accepts the following parameters:
1811 This option string is in format:
1812 "c@var{chn} f=@var{cf} w=@var{w} g=@var{g} t=@var{f} | ..."
1813 Each equalizer band is separated by '|'.
1817 Set channel number to which equalization will be applied.
1818 If input doesn't have that channel the entry is ignored.
1821 Set central frequency for band.
1822 If input doesn't have that frequency the entry is ignored.
1825 Set band width in hertz.
1828 Set band gain in dB.
1831 Set filter type for band, optional, can be:
1835 Butterworth, this is default.
1846 With this option activated frequency response of anequalizer is displayed
1850 Set video stream size. Only useful if curves option is activated.
1853 Set max gain that will be displayed. Only useful if curves option is activated.
1854 Setting this to a reasonable value makes it possible to display gain which is derived from
1855 neighbour bands which are too close to each other and thus produce higher gain
1856 when both are activated.
1859 Set frequency scale used to draw frequency response in video output.
1860 Can be linear or logarithmic. Default is logarithmic.
1863 Set color for each channel curve which is going to be displayed in video stream.
1864 This is list of color names separated by space or by '|'.
1865 Unrecognised or missing colors will be replaced by white color.
1868 @subsection Examples
1872 Lower gain by 10 of central frequency 200Hz and width 100 Hz
1873 for first 2 channels using Chebyshev type 1 filter:
1875 anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
1879 @subsection Commands
1881 This filter supports the following commands:
1884 Alter existing filter parameters.
1885 Syntax for the commands is : "@var{fN}|f=@var{freq}|w=@var{width}|g=@var{gain}"
1887 @var{fN} is existing filter number, starting from 0, if no such filter is available
1889 @var{freq} set new frequency parameter.
1890 @var{width} set new width parameter in herz.
1891 @var{gain} set new gain parameter in dB.
1893 Full filter invocation with asendcmd may look like this:
1894 asendcmd=c='4.0 anequalizer change 0|f=200|w=50|g=1',anequalizer=...
1899 Reduce broadband noise in audio samples using Non-Local Means algorithm.
1901 Each sample is adjusted by looking for other samples with similar contexts. This
1902 context similarity is defined by comparing their surrounding patches of size
1903 @option{p}. Patches are searched in an area of @option{r} around the sample.
1905 The filter accepts the following options:
1909 Set denoising strength. Allowed range is from 0.00001 to 10. Default value is 0.00001.
1912 Set patch radius duration. Allowed range is from 1 to 100 milliseconds.
1913 Default value is 2 milliseconds.
1916 Set research radius duration. Allowed range is from 2 to 300 milliseconds.
1917 Default value is 6 milliseconds.
1920 Set the output mode.
1922 It accepts the following values:
1925 Pass input unchanged.
1928 Pass noise filtered out.
1933 Default value is @var{o}.
1937 Set smooth factor. Default value is @var{11}. Allowed range is from @var{1} to @var{15}.
1940 @subsection Commands
1942 This filter supports the all above options as @ref{commands}.
1945 Apply Normalized Least-Mean-Squares algorithm to the first audio stream using the second audio stream.
1947 This adaptive filter is used to mimic a desired filter by finding the filter coefficients that
1948 relate to producing the least mean square of the error signal (difference between the desired,
1949 2nd input audio stream and the actual signal, the 1st input audio stream).
1951 A description of the accepted options follows.
1964 Set the filter leakage.
1967 It accepts the following values:
1976 Pass filtered samples.
1979 Pass difference between desired and filtered samples.
1981 Default value is @var{o}.
1985 @subsection Examples
1989 One of many usages of this filter is noise reduction, input audio is filtered
1990 with same samples that are delayed by fixed amount, one such example for stereo audio is:
1992 asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
1996 @subsection Commands
1998 This filter supports the same commands as options, excluding option @code{order}.
2002 Pass the audio source unchanged to the output.
2006 Pad the end of an audio stream with silence.
2008 This can be used together with @command{ffmpeg} @option{-shortest} to
2009 extend audio streams to the same length as the video stream.
2011 A description of the accepted options follows.
2015 Set silence packet size. Default value is 4096.
2018 Set the number of samples of silence to add to the end. After the
2019 value is reached, the stream is terminated. This option is mutually
2020 exclusive with @option{whole_len}.
2023 Set the minimum total number of samples in the output audio stream. If
2024 the value is longer than the input audio length, silence is added to
2025 the end, until the value is reached. This option is mutually exclusive
2026 with @option{pad_len}.
2029 Specify the duration of samples of silence to add. See
2030 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
2031 for the accepted syntax. Used only if set to non-zero value.
2034 Specify the minimum total duration in the output audio stream. See
2035 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
2036 for the accepted syntax. Used only if set to non-zero value. If the value is longer than
2037 the input audio length, silence is added to the end, until the value is reached.
2038 This option is mutually exclusive with @option{pad_dur}
2041 If neither the @option{pad_len} nor the @option{whole_len} nor @option{pad_dur}
2042 nor @option{whole_dur} option is set, the filter will add silence to the end of
2043 the input stream indefinitely.
2045 @subsection Examples
2049 Add 1024 samples of silence to the end of the input:
2055 Make sure the audio output will contain at least 10000 samples, pad
2056 the input with silence if required:
2058 apad=whole_len=10000
2062 Use @command{ffmpeg} to pad the audio input with silence, so that the
2063 video stream will always result the shortest and will be converted
2064 until the end in the output file when using the @option{shortest}
2067 ffmpeg -i VIDEO -i AUDIO -filter_complex "[1:0]apad" -shortest OUTPUT
2072 Add a phasing effect to the input audio.
2074 A phaser filter creates series of peaks and troughs in the frequency spectrum.
2075 The position of the peaks and troughs are modulated so that they vary over time, creating a sweeping effect.
2077 A description of the accepted parameters follows.
2081 Set input gain. Default is 0.4.
2084 Set output gain. Default is 0.74
2087 Set delay in milliseconds. Default is 3.0.
2090 Set decay. Default is 0.4.
2093 Set modulation speed in Hz. Default is 0.5.
2096 Set modulation type. Default is triangular.
2098 It accepts the following values:
2105 @section aphaseshift
2106 Apply phase shift to input audio samples.
2108 The filter accepts the following options:
2112 Specify phase shift. Allowed range is from -1.0 to 1.0.
2113 Default value is 0.0.
2116 @subsection Commands
2118 This filter supports the above option as @ref{commands}.
2122 Audio pulsator is something between an autopanner and a tremolo.
2123 But it can produce funny stereo effects as well. Pulsator changes the volume
2124 of the left and right channel based on a LFO (low frequency oscillator) with
2125 different waveforms and shifted phases.
2126 This filter have the ability to define an offset between left and right
2127 channel. An offset of 0 means that both LFO shapes match each other.
2128 The left and right channel are altered equally - a conventional tremolo.
2129 An offset of 50% means that the shape of the right channel is exactly shifted
2130 in phase (or moved backwards about half of the frequency) - pulsator acts as
2131 an autopanner. At 1 both curves match again. Every setting in between moves the
2132 phase shift gapless between all stages and produces some "bypassing" sounds with
2133 sine and triangle waveforms. The more you set the offset near 1 (starting from
2134 the 0.5) the faster the signal passes from the left to the right speaker.
2136 The filter accepts the following options:
2140 Set input gain. By default it is 1. Range is [0.015625 - 64].
2143 Set output gain. By default it is 1. Range is [0.015625 - 64].
2146 Set waveform shape the LFO will use. Can be one of: sine, triangle, square,
2147 sawup or sawdown. Default is sine.
2150 Set modulation. Define how much of original signal is affected by the LFO.
2153 Set left channel offset. Default is 0. Allowed range is [0 - 1].
2156 Set right channel offset. Default is 0.5. Allowed range is [0 - 1].
2159 Set pulse width. Default is 1. Allowed range is [0 - 2].
2162 Set possible timing mode. Can be one of: bpm, ms or hz. Default is hz.
2165 Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if timing
2169 Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if timing
2173 Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100]. Only used
2174 if timing is set to hz.
2180 Resample the input audio to the specified parameters, using the
2181 libswresample library. If none are specified then the filter will
2182 automatically convert between its input and output.
2184 This filter is also able to stretch/squeeze the audio data to make it match
2185 the timestamps or to inject silence / cut out audio to make it match the
2186 timestamps, do a combination of both or do neither.
2188 The filter accepts the syntax
2189 [@var{sample_rate}:]@var{resampler_options}, where @var{sample_rate}
2190 expresses a sample rate and @var{resampler_options} is a list of
2191 @var{key}=@var{value} pairs, separated by ":". See the
2192 @ref{Resampler Options,,"Resampler Options" section in the
2193 ffmpeg-resampler(1) manual,ffmpeg-resampler}
2194 for the complete list of supported options.
2196 @subsection Examples
2200 Resample the input audio to 44100Hz:
2206 Stretch/squeeze samples to the given timestamps, with a maximum of 1000
2207 samples per second compensation:
2209 aresample=async=1000
2215 Reverse an audio clip.
2217 Warning: This filter requires memory to buffer the entire clip, so trimming
2220 @subsection Examples
2224 Take the first 5 seconds of a clip, and reverse it.
2226 atrim=end=5,areverse
2232 Reduce noise from speech using Recurrent Neural Networks.
2234 This filter accepts the following options:
2238 Set train model file to load. This option is always required.
2241 @section asetnsamples
2243 Set the number of samples per each output audio frame.
2245 The last output packet may contain a different number of samples, as
2246 the filter will flush all the remaining samples when the input audio
2249 The filter accepts the following options:
2253 @item nb_out_samples, n
2254 Set the number of frames per each output audio frame. The number is
2255 intended as the number of samples @emph{per each channel}.
2256 Default value is 1024.
2259 If set to 1, the filter will pad the last audio frame with zeroes, so
2260 that the last frame will contain the same number of samples as the
2261 previous ones. Default value is 1.
2264 For example, to set the number of per-frame samples to 1234 and
2265 disable padding for the last frame, use:
2267 asetnsamples=n=1234:p=0
2272 Set the sample rate without altering the PCM data.
2273 This will result in a change of speed and pitch.
2275 The filter accepts the following options:
2278 @item sample_rate, r
2279 Set the output sample rate. Default is 44100 Hz.
2284 Show a line containing various information for each input audio frame.
2285 The input audio is not modified.
2287 The shown line contains a sequence of key/value pairs of the form
2288 @var{key}:@var{value}.
2290 The following values are shown in the output:
2294 The (sequential) number of the input frame, starting from 0.
2297 The presentation timestamp of the input frame, in time base units; the time base
2298 depends on the filter input pad, and is usually 1/@var{sample_rate}.
2301 The presentation timestamp of the input frame in seconds.
2304 position of the frame in the input stream, -1 if this information in
2305 unavailable and/or meaningless (for example in case of synthetic audio)
2314 The sample rate for the audio frame.
2317 The number of samples (per channel) in the frame.
2320 The Adler-32 checksum (printed in hexadecimal) of the audio data. For planar
2321 audio, the data is treated as if all the planes were concatenated.
2323 @item plane_checksums
2324 A list of Adler-32 checksums for each data plane.
2328 Apply audio soft clipping.
2330 Soft clipping is a type of distortion effect where the amplitude of a signal is saturated
2331 along a smooth curve, rather than the abrupt shape of hard-clipping.
2333 This filter accepts the following options:
2337 Set type of soft-clipping.
2339 It accepts the following values:
2353 Set additional parameter which controls sigmoid function.
2356 Set oversampling factor.
2359 @subsection Commands
2361 This filter supports the all above options as @ref{commands}.
2364 Automatic Speech Recognition
2366 This filter uses PocketSphinx for speech recognition. To enable
2367 compilation of this filter, you need to configure FFmpeg with
2368 @code{--enable-pocketsphinx}.
2370 It accepts the following options:
2374 Set sampling rate of input audio. Defaults is @code{16000}.
2375 This need to match speech models, otherwise one will get poor results.
2378 Set dictionary containing acoustic model files.
2381 Set pronunciation dictionary.
2384 Set language model file.
2387 Set language model set.
2390 Set which language model to use.
2393 Set output for log messages.
2396 The filter exports recognized speech as the frame metadata @code{lavfi.asr.text}.
2401 Display time domain statistical information about the audio channels.
2402 Statistics are calculated and displayed for each audio channel and,
2403 where applicable, an overall figure is also given.
2405 It accepts the following option:
2408 Short window length in seconds, used for peak and trough RMS measurement.
2409 Default is @code{0.05} (50 milliseconds). Allowed range is @code{[0.01 - 10]}.
2413 Set metadata injection. All the metadata keys are prefixed with @code{lavfi.astats.X},
2414 where @code{X} is channel number starting from 1 or string @code{Overall}. Default is
2417 Available keys for each channel are:
2463 For example full key look like this @code{lavfi.astats.1.DC_offset} or
2464 this @code{lavfi.astats.Overall.Peak_count}.
2466 For description what each key means read below.
2469 Set number of frame after which stats are going to be recalculated.
2470 Default is disabled.
2472 @item measure_perchannel
2473 Select the entries which need to be measured per channel. The metadata keys can
2474 be used as flags, default is @option{all} which measures everything.
2475 @option{none} disables all per channel measurement.
2477 @item measure_overall
2478 Select the entries which need to be measured overall. The metadata keys can
2479 be used as flags, default is @option{all} which measures everything.
2480 @option{none} disables all overall measurement.
2484 A description of each shown parameter follows:
2488 Mean amplitude displacement from zero.
2491 Minimal sample level.
2494 Maximal sample level.
2496 @item Min difference
2497 Minimal difference between two consecutive samples.
2499 @item Max difference
2500 Maximal difference between two consecutive samples.
2502 @item Mean difference
2503 Mean difference between two consecutive samples.
2504 The average of each difference between two consecutive samples.
2506 @item RMS difference
2507 Root Mean Square difference between two consecutive samples.
2511 Standard peak and RMS level measured in dBFS.
2515 Peak and trough values for RMS level measured over a short window.
2518 Standard ratio of peak to RMS level (note: not in dB).
2521 Flatness (i.e. consecutive samples with the same value) of the signal at its peak levels
2522 (i.e. either @var{Min level} or @var{Max level}).
2525 Number of occasions (not the number of samples) that the signal attained either
2526 @var{Min level} or @var{Max level}.
2528 @item Noise floor dB
2529 Minimum local peak measured in dBFS over a short window.
2531 @item Noise floor count
2532 Number of occasions (not the number of samples) that the signal attained
2536 Overall bit depth of audio. Number of bits used for each sample.
2539 Measured dynamic range of audio in dB.
2541 @item Zero crossings
2542 Number of points where the waveform crosses the zero level axis.
2544 @item Zero crossings rate
2545 Rate of Zero crossings and number of audio samples.
2549 Boost subwoofer frequencies.
2551 The filter accepts the following options:
2555 Set dry gain, how much of original signal is kept. Allowed range is from 0 to 1.
2556 Default value is 0.5.
2559 Set wet gain, how much of filtered signal is kept. Allowed range is from 0 to 1.
2560 Default value is 0.8.
2563 Set delay line decay gain value. Allowed range is from 0 to 1.
2564 Default value is 0.7.
2567 Set delay line feedback gain value. Allowed range is from 0 to 1.
2568 Default value is 0.5.
2571 Set cutoff frequency in herz. Allowed range is 50 to 900.
2572 Default value is 100.
2575 Set slope amount for cutoff frequency. Allowed range is 0.0001 to 1.
2576 Default value is 0.5.
2579 Set delay. Allowed range is from 1 to 100.
2580 Default value is 20.
2583 @subsection Commands
2585 This filter supports the all above options as @ref{commands}.
2591 The filter accepts exactly one parameter, the audio tempo. If not
2592 specified then the filter will assume nominal 1.0 tempo. Tempo must
2593 be in the [0.5, 100.0] range.
2595 Note that tempo greater than 2 will skip some samples rather than
2596 blend them in. If for any reason this is a concern it is always
2597 possible to daisy-chain several instances of atempo to achieve the
2598 desired product tempo.
2600 @subsection Examples
2604 Slow down audio to 80% tempo:
2610 To speed up audio to 300% tempo:
2616 To speed up audio to 300% tempo by daisy-chaining two atempo instances:
2618 atempo=sqrt(3),atempo=sqrt(3)
2622 @subsection Commands
2624 This filter supports the following commands:
2627 Change filter tempo scale factor.
2628 Syntax for the command is : "@var{tempo}"
2633 Trim the input so that the output contains one continuous subpart of the input.
2635 It accepts the following parameters:
2638 Timestamp (in seconds) of the start of the section to keep. I.e. the audio
2639 sample with the timestamp @var{start} will be the first sample in the output.
2642 Specify time of the first audio sample that will be dropped, i.e. the
2643 audio sample immediately preceding the one with the timestamp @var{end} will be
2644 the last sample in the output.
2647 Same as @var{start}, except this option sets the start timestamp in samples
2651 Same as @var{end}, except this option sets the end timestamp in samples instead
2655 The maximum duration of the output in seconds.
2658 The number of the first sample that should be output.
2661 The number of the first sample that should be dropped.
2664 @option{start}, @option{end}, and @option{duration} are expressed as time
2665 duration specifications; see
2666 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
2668 Note that the first two sets of the start/end options and the @option{duration}
2669 option look at the frame timestamp, while the _sample options simply count the
2670 samples that pass through the filter. So start/end_pts and start/end_sample will
2671 give different results when the timestamps are wrong, inexact or do not start at
2672 zero. Also note that this filter does not modify the timestamps. If you wish
2673 to have the output timestamps start at zero, insert the asetpts filter after the
2676 If multiple start or end options are set, this filter tries to be greedy and
2677 keep all samples that match at least one of the specified constraints. To keep
2678 only the part that matches all the constraints at once, chain multiple atrim
2681 The defaults are such that all the input is kept. So it is possible to set e.g.
2682 just the end values to keep everything before the specified time.
2687 Drop everything except the second minute of input:
2689 ffmpeg -i INPUT -af atrim=60:120
2693 Keep only the first 1000 samples:
2695 ffmpeg -i INPUT -af atrim=end_sample=1000
2700 @section axcorrelate
2701 Calculate normalized cross-correlation between two input audio streams.
2703 Resulted samples are always between -1 and 1 inclusive.
2704 If result is 1 it means two input samples are highly correlated in that selected segment.
2705 Result 0 means they are not correlated at all.
2706 If result is -1 it means two input samples are out of phase, which means they cancel each
2709 The filter accepts the following options:
2713 Set size of segment over which cross-correlation is calculated.
2714 Default is 256. Allowed range is from 2 to 131072.
2717 Set algorithm for cross-correlation. Can be @code{slow} or @code{fast}.
2718 Default is @code{slow}. Fast algorithm assumes mean values over any given segment
2719 are always zero and thus need much less calculations to make.
2720 This is generally not true, but is valid for typical audio streams.
2723 @subsection Examples
2727 Calculate correlation between channels in stereo audio stream:
2729 ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
2735 Apply a two-pole Butterworth band-pass filter with central
2736 frequency @var{frequency}, and (3dB-point) band-width width.
2737 The @var{csg} option selects a constant skirt gain (peak gain = Q)
2738 instead of the default: constant 0dB peak gain.
2739 The filter roll off at 6dB per octave (20dB per decade).
2741 The filter accepts the following options:
2745 Set the filter's central frequency. Default is @code{3000}.
2748 Constant skirt gain if set to 1. Defaults to 0.
2751 Set method to specify band-width of filter.
2766 Specify the band-width of a filter in width_type units.
2769 How much to use filtered signal in output. Default is 1.
2770 Range is between 0 and 1.
2773 Specify which channels to filter, by default all available are filtered.
2776 Normalize biquad coefficients, by default is disabled.
2777 Enabling it will normalize magnitude response at DC to 0dB.
2780 Set transform type of IIR filter.
2789 @subsection Commands
2791 This filter supports the following commands:
2794 Change bandpass frequency.
2795 Syntax for the command is : "@var{frequency}"
2798 Change bandpass width_type.
2799 Syntax for the command is : "@var{width_type}"
2802 Change bandpass width.
2803 Syntax for the command is : "@var{width}"
2806 Change bandpass mix.
2807 Syntax for the command is : "@var{mix}"
2812 Apply a two-pole Butterworth band-reject filter with central
2813 frequency @var{frequency}, and (3dB-point) band-width @var{width}.
2814 The filter roll off at 6dB per octave (20dB per decade).
2816 The filter accepts the following options:
2820 Set the filter's central frequency. Default is @code{3000}.
2823 Set method to specify band-width of filter.
2838 Specify the band-width of a filter in width_type units.
2841 How much to use filtered signal in output. Default is 1.
2842 Range is between 0 and 1.
2845 Specify which channels to filter, by default all available are filtered.
2848 Normalize biquad coefficients, by default is disabled.
2849 Enabling it will normalize magnitude response at DC to 0dB.
2852 Set transform type of IIR filter.
2861 @subsection Commands
2863 This filter supports the following commands:
2866 Change bandreject frequency.
2867 Syntax for the command is : "@var{frequency}"
2870 Change bandreject width_type.
2871 Syntax for the command is : "@var{width_type}"
2874 Change bandreject width.
2875 Syntax for the command is : "@var{width}"
2878 Change bandreject mix.
2879 Syntax for the command is : "@var{mix}"
2882 @section bass, lowshelf
2884 Boost or cut the bass (lower) frequencies of the audio using a two-pole
2885 shelving filter with a response similar to that of a standard
2886 hi-fi's tone-controls. This is also known as shelving equalisation (EQ).
2888 The filter accepts the following options:
2892 Give the gain at 0 Hz. Its useful range is about -20
2893 (for a large cut) to +20 (for a large boost).
2894 Beware of clipping when using a positive gain.
2897 Set the filter's central frequency and so can be used
2898 to extend or reduce the frequency range to be boosted or cut.
2899 The default value is @code{100} Hz.
2902 Set method to specify band-width of filter.
2917 Determine how steep is the filter's shelf transition.
2920 How much to use filtered signal in output. Default is 1.
2921 Range is between 0 and 1.
2924 Specify which channels to filter, by default all available are filtered.
2927 Normalize biquad coefficients, by default is disabled.
2928 Enabling it will normalize magnitude response at DC to 0dB.
2931 Set transform type of IIR filter.
2940 @subsection Commands
2942 This filter supports the following commands:
2945 Change bass frequency.
2946 Syntax for the command is : "@var{frequency}"
2949 Change bass width_type.
2950 Syntax for the command is : "@var{width_type}"
2954 Syntax for the command is : "@var{width}"
2958 Syntax for the command is : "@var{gain}"
2962 Syntax for the command is : "@var{mix}"
2967 Apply a biquad IIR filter with the given coefficients.
2968 Where @var{b0}, @var{b1}, @var{b2} and @var{a0}, @var{a1}, @var{a2}
2969 are the numerator and denominator coefficients respectively.
2970 and @var{channels}, @var{c} specify which channels to filter, by default all
2971 available are filtered.
2973 @subsection Commands
2975 This filter supports the following commands:
2983 Change biquad parameter.
2984 Syntax for the command is : "@var{value}"
2987 How much to use filtered signal in output. Default is 1.
2988 Range is between 0 and 1.
2991 Specify which channels to filter, by default all available are filtered.
2994 Normalize biquad coefficients, by default is disabled.
2995 Enabling it will normalize magnitude response at DC to 0dB.
2998 Set transform type of IIR filter.
3008 Bauer stereo to binaural transformation, which improves headphone listening of
3009 stereo audio records.
3011 To enable compilation of this filter you need to configure FFmpeg with
3012 @code{--enable-libbs2b}.
3014 It accepts the following parameters:
3018 Pre-defined crossfeed level.
3022 Default level (fcut=700, feed=50).
3025 Chu Moy circuit (fcut=700, feed=60).
3028 Jan Meier circuit (fcut=650, feed=95).
3033 Cut frequency (in Hz).
3042 Remap input channels to new locations.
3044 It accepts the following parameters:
3047 Map channels from input to output. The argument is a '|'-separated list of
3048 mappings, each in the @code{@var{in_channel}-@var{out_channel}} or
3049 @var{in_channel} form. @var{in_channel} can be either the name of the input
3050 channel (e.g. FL for front left) or its index in the input channel layout.
3051 @var{out_channel} is the name of the output channel or its index in the output
3052 channel layout. If @var{out_channel} is not given then it is implicitly an
3053 index, starting with zero and increasing by one for each mapping.
3055 @item channel_layout
3056 The channel layout of the output stream.
3059 If no mapping is present, the filter will implicitly map input channels to
3060 output channels, preserving indices.
3062 @subsection Examples
3066 For example, assuming a 5.1+downmix input MOV file,
3068 ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav
3070 will create an output WAV file tagged as stereo from the downmix channels of
3074 To fix a 5.1 WAV improperly encoded in AAC's native channel order
3076 ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav
3080 @section channelsplit
3082 Split each channel from an input audio stream into a separate output stream.
3084 It accepts the following parameters:
3086 @item channel_layout
3087 The channel layout of the input stream. The default is "stereo".
3089 A channel layout describing the channels to be extracted as separate output streams
3090 or "all" to extract each input channel as a separate stream. The default is "all".
3092 Choosing channels not present in channel layout in the input will result in an error.
3095 @subsection Examples
3099 For example, assuming a stereo input MP3 file,
3101 ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
3103 will create an output Matroska file with two audio streams, one containing only
3104 the left channel and the other the right channel.
3107 Split a 5.1 WAV file into per-channel files:
3109 ffmpeg -i in.wav -filter_complex
3110 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
3111 -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
3112 front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
3117 Extract only LFE from a 5.1 WAV file:
3119 ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]'
3120 -map '[LFE]' lfe.wav
3125 Add a chorus effect to the audio.
3127 Can make a single vocal sound like a chorus, but can also be applied to instrumentation.
3129 Chorus resembles an echo effect with a short delay, but whereas with echo the delay is
3130 constant, with chorus, it is varied using using sinusoidal or triangular modulation.
3131 The modulation depth defines the range the modulated delay is played before or after
3132 the delay. Hence the delayed sound will sound slower or faster, that is the delayed
3133 sound tuned around the original one, like in a chorus where some vocals are slightly
3136 It accepts the following parameters:
3139 Set input gain. Default is 0.4.
3142 Set output gain. Default is 0.4.
3145 Set delays. A typical delay is around 40ms to 60ms.
3157 @subsection Examples
3163 chorus=0.7:0.9:55:0.4:0.25:2
3169 chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3
3173 Fuller sounding chorus with three delays:
3175 chorus=0.5:0.9:50|60|40:0.4|0.32|0.3:0.25|0.4|0.3:2|2.3|1.3
3180 Compress or expand the audio's dynamic range.
3182 It accepts the following parameters:
3188 A list of times in seconds for each channel over which the instantaneous level
3189 of the input signal is averaged to determine its volume. @var{attacks} refers to
3190 increase of volume and @var{decays} refers to decrease of volume. For most
3191 situations, the attack time (response to the audio getting louder) should be
3192 shorter than the decay time, because the human ear is more sensitive to sudden
3193 loud audio than sudden soft audio. A typical value for attack is 0.3 seconds and
3194 a typical value for decay is 0.8 seconds.
3195 If specified number of attacks & decays is lower than number of channels, the last
3196 set attack/decay will be used for all remaining channels.
3199 A list of points for the transfer function, specified in dB relative to the
3200 maximum possible signal amplitude. Each key points list must be defined using
3201 the following syntax: @code{x0/y0|x1/y1|x2/y2|....} or
3202 @code{x0/y0 x1/y1 x2/y2 ....}
3204 The input values must be in strictly increasing order but the transfer function
3205 does not have to be monotonically rising. The point @code{0/0} is assumed but
3206 may be overridden (by @code{0/out-dBn}). Typical values for the transfer
3207 function are @code{-70/-70|-60/-20|1/0}.
3210 Set the curve radius in dB for all joints. It defaults to 0.01.
3213 Set the additional gain in dB to be applied at all points on the transfer
3214 function. This allows for easy adjustment of the overall gain.
3218 Set an initial volume, in dB, to be assumed for each channel when filtering
3219 starts. This permits the user to supply a nominal level initially, so that, for
3220 example, a very large gain is not applied to initial signal levels before the
3221 companding has begun to operate. A typical value for audio which is initially
3222 quiet is -90 dB. It defaults to 0.
3225 Set a delay, in seconds. The input audio is analyzed immediately, but audio is
3226 delayed before being fed to the volume adjuster. Specifying a delay
3227 approximately equal to the attack/decay times allows the filter to effectively
3228 operate in predictive rather than reactive mode. It defaults to 0.
3232 @subsection Examples
3236 Make music with both quiet and loud passages suitable for listening to in a
3239 compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2
3242 Another example for audio with whisper and explosion parts:
3244 compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0
3248 A noise gate for when the noise is at a lower level than the signal:
3250 compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1
3254 Here is another noise gate, this time for when the noise is at a higher level
3255 than the signal (making it, in some ways, similar to squelch):
3257 compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1
3261 2:1 compression starting at -6dB:
3263 compand=points=-80/-80|-6/-6|0/-3.8|20/3.5
3267 2:1 compression starting at -9dB:
3269 compand=points=-80/-80|-9/-9|0/-5.3|20/2.9
3273 2:1 compression starting at -12dB:
3275 compand=points=-80/-80|-12/-12|0/-6.8|20/1.9
3279 2:1 compression starting at -18dB:
3281 compand=points=-80/-80|-18/-18|0/-9.8|20/0.7
3285 3:1 compression starting at -15dB:
3287 compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2
3293 compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6
3299 compand=attacks=0:points=-80/-169|-54/-80|-49.5/-64.6|-41.1/-41.1|-25.8/-15|-10.8/-4.5|0/0|20/8.3
3303 Hard limiter at -6dB:
3305 compand=attacks=0:points=-80/-80|-6/-6|20/-6
3309 Hard limiter at -12dB:
3311 compand=attacks=0:points=-80/-80|-12/-12|20/-12
3315 Hard noise gate at -35 dB:
3317 compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20
3323 compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8
3327 @section compensationdelay
3329 Compensation Delay Line is a metric based delay to compensate differing
3330 positions of microphones or speakers.
3332 For example, you have recorded guitar with two microphones placed in
3333 different locations. Because the front of sound wave has fixed speed in
3334 normal conditions, the phasing of microphones can vary and depends on
3335 their location and interposition. The best sound mix can be achieved when
3336 these microphones are in phase (synchronized). Note that a distance of
3337 ~30 cm between microphones makes one microphone capture the signal in
3338 antiphase to the other microphone. That makes the final mix sound moody.
3339 This filter helps to solve phasing problems by adding different delays
3340 to each microphone track and make them synchronized.
3342 The best result can be reached when you take one track as base and
3343 synchronize other tracks one by one with it.
3344 Remember that synchronization/delay tolerance depends on sample rate, too.
3345 Higher sample rates will give more tolerance.
3347 The filter accepts the following parameters:
3351 Set millimeters distance. This is compensation distance for fine tuning.
3355 Set cm distance. This is compensation distance for tightening distance setup.
3359 Set meters distance. This is compensation distance for hard distance setup.
3363 Set dry amount. Amount of unprocessed (dry) signal.
3367 Set wet amount. Amount of processed (wet) signal.
3371 Set temperature in degrees Celsius. This is the temperature of the environment.
3376 Apply headphone crossfeed filter.
3378 Crossfeed is the process of blending the left and right channels of stereo
3380 It is mainly used to reduce extreme stereo separation of low frequencies.
3382 The intent is to produce more speaker like sound to the listener.
3384 The filter accepts the following options:
3388 Set strength of crossfeed. Default is 0.2. Allowed range is from 0 to 1.
3389 This sets gain of low shelf filter for side part of stereo image.
3390 Default is -6dB. Max allowed is -30db when strength is set to 1.
3393 Set soundstage wideness. Default is 0.5. Allowed range is from 0 to 1.
3394 This sets cut off frequency of low shelf filter. Default is cut off near
3395 1550 Hz. With range set to 1 cut off frequency is set to 2100 Hz.
3398 Set curve slope of low shelf filter. Default is 0.5.
3399 Allowed range is from 0.01 to 1.
3402 Set input gain. Default is 0.9.
3405 Set output gain. Default is 1.
3408 @subsection Commands
3410 This filter supports the all above options as @ref{commands}.
3412 @section crystalizer
3413 Simple algorithm to expand audio dynamic range.
3415 The filter accepts the following options:
3419 Sets the intensity of effect (default: 2.0). Must be in range between 0.0
3420 (unchanged sound) to 10.0 (maximum effect).
3423 Enable clipping. By default is enabled.
3426 @subsection Commands
3428 This filter supports the all above options as @ref{commands}.
3431 Apply a DC shift to the audio.
3433 This can be useful to remove a DC offset (caused perhaps by a hardware problem
3434 in the recording chain) from the audio. The effect of a DC offset is reduced
3435 headroom and hence volume. The @ref{astats} filter can be used to determine if
3436 a signal has a DC offset.
3440 Set the DC shift, allowed range is [-1, 1]. It indicates the amount to shift
3444 Optional. It should have a value much less than 1 (e.g. 0.05 or 0.02) and is
3445 used to prevent clipping.
3450 Apply de-essing to the audio samples.
3454 Set intensity for triggering de-essing. Allowed range is from 0 to 1.
3458 Set amount of ducking on treble part of sound. Allowed range is from 0 to 1.
3462 How much of original frequency content to keep when de-essing. Allowed range is from 0 to 1.
3466 Set the output mode.
3468 It accepts the following values:
3471 Pass input unchanged.
3474 Pass ess filtered out.
3479 Default value is @var{o}.
3485 Measure audio dynamic range.
3487 DR values of 14 and higher is found in very dynamic material. DR of 8 to 13
3488 is found in transition material. And anything less that 8 have very poor dynamics
3489 and is very compressed.
3491 The filter accepts the following options:
3495 Set window length in seconds used to split audio into segments of equal length.
3496 Default is 3 seconds.
3500 Dynamic Audio Normalizer.
3502 This filter applies a certain amount of gain to the input audio in order
3503 to bring its peak magnitude to a target level (e.g. 0 dBFS). However, in
3504 contrast to more "simple" normalization algorithms, the Dynamic Audio
3505 Normalizer *dynamically* re-adjusts the gain factor to the input audio.
3506 This allows for applying extra gain to the "quiet" sections of the audio
3507 while avoiding distortions or clipping the "loud" sections. In other words:
3508 The Dynamic Audio Normalizer will "even out" the volume of quiet and loud
3509 sections, in the sense that the volume of each section is brought to the
3510 same target level. Note, however, that the Dynamic Audio Normalizer achieves
3511 this goal *without* applying "dynamic range compressing". It will retain 100%
3512 of the dynamic range *within* each section of the audio file.
3516 Set the frame length in milliseconds. In range from 10 to 8000 milliseconds.
3517 Default is 500 milliseconds.
3518 The Dynamic Audio Normalizer processes the input audio in small chunks,
3519 referred to as frames. This is required, because a peak magnitude has no
3520 meaning for just a single sample value. Instead, we need to determine the
3521 peak magnitude for a contiguous sequence of sample values. While a "standard"
3522 normalizer would simply use the peak magnitude of the complete file, the
3523 Dynamic Audio Normalizer determines the peak magnitude individually for each
3524 frame. The length of a frame is specified in milliseconds. By default, the
3525 Dynamic Audio Normalizer uses a frame length of 500 milliseconds, which has
3526 been found to give good results with most files.
3527 Note that the exact frame length, in number of samples, will be determined
3528 automatically, based on the sampling rate of the individual input audio file.
3531 Set the Gaussian filter window size. In range from 3 to 301, must be odd
3532 number. Default is 31.
3533 Probably the most important parameter of the Dynamic Audio Normalizer is the
3534 @code{window size} of the Gaussian smoothing filter. The filter's window size
3535 is specified in frames, centered around the current frame. For the sake of
3536 simplicity, this must be an odd number. Consequently, the default value of 31
3537 takes into account the current frame, as well as the 15 preceding frames and
3538 the 15 subsequent frames. Using a larger window results in a stronger
3539 smoothing effect and thus in less gain variation, i.e. slower gain
3540 adaptation. Conversely, using a smaller window results in a weaker smoothing
3541 effect and thus in more gain variation, i.e. faster gain adaptation.
3542 In other words, the more you increase this value, the more the Dynamic Audio
3543 Normalizer will behave like a "traditional" normalization filter. On the
3544 contrary, the more you decrease this value, the more the Dynamic Audio
3545 Normalizer will behave like a dynamic range compressor.
3548 Set the target peak value. This specifies the highest permissible magnitude
3549 level for the normalized audio input. This filter will try to approach the
3550 target peak magnitude as closely as possible, but at the same time it also
3551 makes sure that the normalized signal will never exceed the peak magnitude.
3552 A frame's maximum local gain factor is imposed directly by the target peak
3553 magnitude. The default value is 0.95 and thus leaves a headroom of 5%*.
3554 It is not recommended to go above this value.
3557 Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0.
3558 The Dynamic Audio Normalizer determines the maximum possible (local) gain
3559 factor for each input frame, i.e. the maximum gain factor that does not
3560 result in clipping or distortion. The maximum gain factor is determined by
3561 the frame's highest magnitude sample. However, the Dynamic Audio Normalizer
3562 additionally bounds the frame's maximum gain factor by a predetermined
3563 (global) maximum gain factor. This is done in order to avoid excessive gain
3564 factors in "silent" or almost silent frames. By default, the maximum gain
3565 factor is 10.0, For most inputs the default value should be sufficient and
3566 it usually is not recommended to increase this value. Though, for input
3567 with an extremely low overall volume level, it may be necessary to allow even
3568 higher gain factors. Note, however, that the Dynamic Audio Normalizer does
3569 not simply apply a "hard" threshold (i.e. cut off values above the threshold).
3570 Instead, a "sigmoid" threshold function will be applied. This way, the
3571 gain factors will smoothly approach the threshold value, but never exceed that
3575 Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled.
3576 By default, the Dynamic Audio Normalizer performs "peak" normalization.
3577 This means that the maximum local gain factor for each frame is defined
3578 (only) by the frame's highest magnitude sample. This way, the samples can
3579 be amplified as much as possible without exceeding the maximum signal
3580 level, i.e. without clipping. Optionally, however, the Dynamic Audio
3581 Normalizer can also take into account the frame's root mean square,
3582 abbreviated RMS. In electrical engineering, the RMS is commonly used to
3583 determine the power of a time-varying signal. It is therefore considered
3584 that the RMS is a better approximation of the "perceived loudness" than
3585 just looking at the signal's peak magnitude. Consequently, by adjusting all
3586 frames to a constant RMS value, a uniform "perceived loudness" can be
3587 established. If a target RMS value has been specified, a frame's local gain
3588 factor is defined as the factor that would result in exactly that RMS value.
3589 Note, however, that the maximum local gain factor is still restricted by the
3590 frame's highest magnitude sample, in order to prevent clipping.
3593 Enable channels coupling. By default is enabled.
3594 By default, the Dynamic Audio Normalizer will amplify all channels by the same
3595 amount. This means the same gain factor will be applied to all channels, i.e.
3596 the maximum possible gain factor is determined by the "loudest" channel.
3597 However, in some recordings, it may happen that the volume of the different
3598 channels is uneven, e.g. one channel may be "quieter" than the other one(s).
3599 In this case, this option can be used to disable the channel coupling. This way,
3600 the gain factor will be determined independently for each channel, depending
3601 only on the individual channel's highest magnitude sample. This allows for
3602 harmonizing the volume of the different channels.
3605 Enable DC bias correction. By default is disabled.
3606 An audio signal (in the time domain) is a sequence of sample values.
3607 In the Dynamic Audio Normalizer these sample values are represented in the
3608 -1.0 to 1.0 range, regardless of the original input format. Normally, the
3609 audio signal, or "waveform", should be centered around the zero point.
3610 That means if we calculate the mean value of all samples in a file, or in a
3611 single frame, then the result should be 0.0 or at least very close to that
3612 value. If, however, there is a significant deviation of the mean value from
3613 0.0, in either positive or negative direction, this is referred to as a
3614 DC bias or DC offset. Since a DC bias is clearly undesirable, the Dynamic
3615 Audio Normalizer provides optional DC bias correction.
3616 With DC bias correction enabled, the Dynamic Audio Normalizer will determine
3617 the mean value, or "DC correction" offset, of each input frame and subtract
3618 that value from all of the frame's sample values which ensures those samples
3619 are centered around 0.0 again. Also, in order to avoid "gaps" at the frame
3620 boundaries, the DC correction offset values will be interpolated smoothly
3621 between neighbouring frames.
3623 @item altboundary, b
3624 Enable alternative boundary mode. By default is disabled.
3625 The Dynamic Audio Normalizer takes into account a certain neighbourhood
3626 around each frame. This includes the preceding frames as well as the
3627 subsequent frames. However, for the "boundary" frames, located at the very
3628 beginning and at the very end of the audio file, not all neighbouring
3629 frames are available. In particular, for the first few frames in the audio
3630 file, the preceding frames are not known. And, similarly, for the last few
3631 frames in the audio file, the subsequent frames are not known. Thus, the
3632 question arises which gain factors should be assumed for the missing frames
3633 in the "boundary" region. The Dynamic Audio Normalizer implements two modes
3634 to deal with this situation. The default boundary mode assumes a gain factor
3635 of exactly 1.0 for the missing frames, resulting in a smooth "fade in" and
3636 "fade out" at the beginning and at the end of the input, respectively.
3639 Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
3640 By default, the Dynamic Audio Normalizer does not apply "traditional"
3641 compression. This means that signal peaks will not be pruned and thus the
3642 full dynamic range will be retained within each local neighbourhood. However,
3643 in some cases it may be desirable to combine the Dynamic Audio Normalizer's
3644 normalization algorithm with a more "traditional" compression.
3645 For this purpose, the Dynamic Audio Normalizer provides an optional compression
3646 (thresholding) function. If (and only if) the compression feature is enabled,
3647 all input frames will be processed by a soft knee thresholding function prior
3648 to the actual normalization process. Put simply, the thresholding function is
3649 going to prune all samples whose magnitude exceeds a certain threshold value.
3650 However, the Dynamic Audio Normalizer does not simply apply a fixed threshold
3651 value. Instead, the threshold value will be adjusted for each individual
3653 In general, smaller parameters result in stronger compression, and vice versa.
3654 Values below 3.0 are not recommended, because audible distortion may appear.
3657 Set the target threshold value. This specifies the lowest permissible
3658 magnitude level for the audio input which will be normalized.
3659 If input frame volume is above this value frame will be normalized.
3660 Otherwise frame may not be normalized at all. The default value is set
3661 to 0, which means all input frames will be normalized.
3662 This option is mostly useful if digital noise is not wanted to be amplified.
3665 @subsection Commands
3667 This filter supports the all above options as @ref{commands}.
3671 Make audio easier to listen to on headphones.
3673 This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio
3674 so that when listened to on headphones the stereo image is moved from
3675 inside your head (standard for headphones) to outside and in front of
3676 the listener (standard for speakers).
3682 Apply a two-pole peaking equalisation (EQ) filter. With this
3683 filter, the signal-level at and around a selected frequency can
3684 be increased or decreased, whilst (unlike bandpass and bandreject
3685 filters) that at all other frequencies is unchanged.
3687 In order to produce complex equalisation curves, this filter can
3688 be given several times, each with a different central frequency.
3690 The filter accepts the following options:
3694 Set the filter's central frequency in Hz.
3697 Set method to specify band-width of filter.
3712 Specify the band-width of a filter in width_type units.
3715 Set the required gain or attenuation in dB.
3716 Beware of clipping when using a positive gain.
3719 How much to use filtered signal in output. Default is 1.
3720 Range is between 0 and 1.
3723 Specify which channels to filter, by default all available are filtered.
3726 Normalize biquad coefficients, by default is disabled.
3727 Enabling it will normalize magnitude response at DC to 0dB.
3730 Set transform type of IIR filter.
3739 @subsection Examples
3742 Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz:
3744 equalizer=f=1000:t=h:width=200:g=-10
3748 Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz with Q 2:
3750 equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5
3754 @subsection Commands
3756 This filter supports the following commands:
3759 Change equalizer frequency.
3760 Syntax for the command is : "@var{frequency}"
3763 Change equalizer width_type.
3764 Syntax for the command is : "@var{width_type}"
3767 Change equalizer width.
3768 Syntax for the command is : "@var{width}"
3771 Change equalizer gain.
3772 Syntax for the command is : "@var{gain}"
3775 Change equalizer mix.
3776 Syntax for the command is : "@var{mix}"
3779 @section extrastereo
3781 Linearly increases the difference between left and right channels which
3782 adds some sort of "live" effect to playback.
3784 The filter accepts the following options:
3788 Sets the difference coefficient (default: 2.5). 0.0 means mono sound
3789 (average of both channels), with 1.0 sound will be unchanged, with
3790 -1.0 left and right channels will be swapped.
3793 Enable clipping. By default is enabled.
3796 @subsection Commands
3798 This filter supports the all above options as @ref{commands}.
3800 @section firequalizer
3801 Apply FIR Equalization using arbitrary frequency response.
3803 The filter accepts the following option:
3807 Set gain curve equation (in dB). The expression can contain variables:
3810 the evaluated frequency
3814 channel number, set to 0 when multichannels evaluation is disabled
3816 channel id, see libavutil/channel_layout.h, set to the first channel id when
3817 multichannels evaluation is disabled
3821 channel_layout, see libavutil/channel_layout.h
3826 @item gain_interpolate(f)
3827 interpolate gain on frequency f based on gain_entry
3828 @item cubic_interpolate(f)
3829 same as gain_interpolate, but smoother
3831 This option is also available as command. Default is @code{gain_interpolate(f)}.
3834 Set gain entry for gain_interpolate function. The expression can
3838 store gain entry at frequency f with value g
3840 This option is also available as command.
3843 Set filter delay in seconds. Higher value means more accurate.
3844 Default is @code{0.01}.
3847 Set filter accuracy in Hz. Lower value means more accurate.
3848 Default is @code{5}.
3851 Set window function. Acceptable values are:
3854 rectangular window, useful when gain curve is already smooth
3856 hann window (default)
3862 3-terms continuous 1st derivative nuttall window
3864 minimum 3-terms discontinuous nuttall window
3866 4-terms continuous 1st derivative nuttall window
3868 minimum 4-terms discontinuous nuttall (blackman-nuttall) window
3870 blackman-harris window
3876 If enabled, use fixed number of audio samples. This improves speed when
3877 filtering with large delay. Default is disabled.
3880 Enable multichannels evaluation on gain. Default is disabled.
3883 Enable zero phase mode by subtracting timestamp to compensate delay.
3884 Default is disabled.
3887 Set scale used by gain. Acceptable values are:
3890 linear frequency, linear gain
3892 linear frequency, logarithmic (in dB) gain (default)
3894 logarithmic (in octave scale where 20 Hz is 0) frequency, linear gain
3896 logarithmic frequency, logarithmic gain
3900 Set file for dumping, suitable for gnuplot.
3903 Set scale for dumpfile. Acceptable values are same with scale option.
3907 Enable 2-channel convolution using complex FFT. This improves speed significantly.
3908 Default is disabled.
3911 Enable minimum phase impulse response. Default is disabled.
3914 @subsection Examples
3919 firequalizer=gain='if(lt(f,1000), 0, -INF)'
3922 lowpass at 1000 Hz with gain_entry:
3924 firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)'
3927 custom equalization:
3929 firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)'
3932 higher delay with zero phase to compensate delay:
3934 firequalizer=delay=0.1:fixed=on:zero_phase=on
3937 lowpass on left channel, highpass on right channel:
3939 firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))'
3940 :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on
3945 Apply a flanging effect to the audio.
3947 The filter accepts the following options:
3951 Set base delay in milliseconds. Range from 0 to 30. Default value is 0.
3954 Set added sweep delay in milliseconds. Range from 0 to 10. Default value is 2.
3957 Set percentage regeneration (delayed signal feedback). Range from -95 to 95.
3961 Set percentage of delayed signal mixed with original. Range from 0 to 100.
3962 Default value is 71.
3965 Set sweeps per second (Hz). Range from 0.1 to 10. Default value is 0.5.
3968 Set swept wave shape, can be @var{triangular} or @var{sinusoidal}.
3969 Default value is @var{sinusoidal}.
3972 Set swept wave percentage-shift for multi channel. Range from 0 to 100.
3973 Default value is 25.
3976 Set delay-line interpolation, @var{linear} or @var{quadratic}.
3977 Default is @var{linear}.
3981 Apply Haas effect to audio.
3983 Note that this makes most sense to apply on mono signals.
3984 With this filter applied to mono signals it give some directionality and
3985 stretches its stereo image.
3987 The filter accepts the following options:
3991 Set input level. By default is @var{1}, or 0dB
3994 Set output level. By default is @var{1}, or 0dB.
3997 Set gain applied to side part of signal. By default is @var{1}.
4000 Set kind of middle source. Can be one of the following:
4010 Pick middle part signal of stereo image.
4013 Pick side part signal of stereo image.
4017 Change middle phase. By default is disabled.
4020 Set left channel delay. By default is @var{2.05} milliseconds.
4023 Set left channel balance. By default is @var{-1}.
4026 Set left channel gain. By default is @var{1}.
4029 Change left phase. By default is disabled.
4032 Set right channel delay. By defaults is @var{2.12} milliseconds.
4035 Set right channel balance. By default is @var{1}.
4038 Set right channel gain. By default is @var{1}.
4041 Change right phase. By default is enabled.
4046 Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM stream with
4047 embedded HDCD codes is expanded into a 20-bit PCM stream.
4049 The filter supports the Peak Extend and Low-level Gain Adjustment features
4050 of HDCD, and detects the Transient Filter flag.
4053 ffmpeg -i HDCD16.flac -af hdcd OUT24.flac
4056 When using the filter with wav, note the default encoding for wav is 16-bit,
4057 so the resulting 20-bit stream will be truncated back to 16-bit. Use something
4058 like @command{-acodec pcm_s24le} after the filter to get 24-bit PCM output.
4060 ffmpeg -i HDCD16.wav -af hdcd OUT16.wav
4061 ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav
4064 The filter accepts the following options:
4067 @item disable_autoconvert
4068 Disable any automatic format conversion or resampling in the filter graph.
4070 @item process_stereo
4071 Process the stereo channels together. If target_gain does not match between
4072 channels, consider it invalid and use the last valid target_gain.
4075 Set the code detect timer period in ms.
4078 Always extend peaks above -3dBFS even if PE isn't signaled.
4081 Replace audio with a solid tone and adjust the amplitude to signal some
4082 specific aspect of the decoding process. The output file can be loaded in
4083 an audio editor alongside the original to aid analysis.
4085 @code{analyze_mode=pe:force_pe=true} can be used to see all samples above the PE level.
4092 Gain adjustment level at each sample
4094 Samples where peak extend occurs
4096 Samples where the code detect timer is active
4098 Samples where the target gain does not match between channels
4104 Apply head-related transfer functions (HRTFs) to create virtual
4105 loudspeakers around the user for binaural listening via headphones.
4106 The HRIRs are provided via additional streams, for each channel
4107 one stereo input stream is needed.
4109 The filter accepts the following options:
4113 Set mapping of input streams for convolution.
4114 The argument is a '|'-separated list of channel names in order as they
4115 are given as additional stream inputs for filter.
4116 This also specify number of input streams. Number of input streams
4117 must be not less than number of channels in first stream plus one.
4120 Set gain applied to audio. Value is in dB. Default is 0.
4123 Set processing type. Can be @var{time} or @var{freq}. @var{time} is
4124 processing audio in time domain which is slow.
4125 @var{freq} is processing audio in frequency domain which is fast.
4126 Default is @var{freq}.
4129 Set custom gain for LFE channels. Value is in dB. Default is 0.
4132 Set size of frame in number of samples which will be processed at once.
4133 Default value is @var{1024}. Allowed range is from 1024 to 96000.
4136 Set format of hrir stream.
4137 Default value is @var{stereo}. Alternative value is @var{multich}.
4138 If value is set to @var{stereo}, number of additional streams should
4139 be greater or equal to number of input channels in first input stream.
4140 Also each additional stream should have stereo number of channels.
4141 If value is set to @var{multich}, number of additional streams should
4142 be exactly one. Also number of input channels of additional stream
4143 should be equal or greater than twice number of channels of first input
4147 @subsection Examples
4151 Full example using wav files as coefficients with amovie filters for 7.1 downmix,
4152 each amovie filter use stereo file with IR coefficients as input.
4153 The files give coefficients for each position of virtual loudspeaker:
4156 -filter_complex "amovie=azi_270_ele_0_DFC.wav[sr];amovie=azi_90_ele_0_DFC.wav[sl];amovie=azi_225_ele_0_DFC.wav[br];amovie=azi_135_ele_0_DFC.wav[bl];amovie=azi_0_ele_0_DFC.wav,asplit[fc][lfe];amovie=azi_35_ele_0_DFC.wav[fl];amovie=azi_325_ele_0_DFC.wav[fr];[0:a][fl][fr][fc][lfe][bl][br][sl][sr]headphone=FL|FR|FC|LFE|BL|BR|SL|SR"
4161 Full example using wav files as coefficients with amovie filters for 7.1 downmix,
4162 but now in @var{multich} @var{hrir} format.
4164 ffmpeg -i input.wav -filter_complex "amovie=minp.wav[hrirs];[0:a][hrirs]headphone=map=FL|FR|FC|LFE|BL|BR|SL|SR:hrir=multich"
4171 Apply a high-pass filter with 3dB point frequency.
4172 The filter can be either single-pole, or double-pole (the default).
4173 The filter roll off at 6dB per pole per octave (20dB per pole per decade).
4175 The filter accepts the following options:
4179 Set frequency in Hz. Default is 3000.
4182 Set number of poles. Default is 2.
4185 Set method to specify band-width of filter.
4200 Specify the band-width of a filter in width_type units.
4201 Applies only to double-pole filter.
4202 The default is 0.707q and gives a Butterworth response.
4205 How much to use filtered signal in output. Default is 1.
4206 Range is between 0 and 1.
4209 Specify which channels to filter, by default all available are filtered.
4212 Normalize biquad coefficients, by default is disabled.
4213 Enabling it will normalize magnitude response at DC to 0dB.
4216 Set transform type of IIR filter.
4225 @subsection Commands
4227 This filter supports the following commands:
4230 Change highpass frequency.
4231 Syntax for the command is : "@var{frequency}"
4234 Change highpass width_type.
4235 Syntax for the command is : "@var{width_type}"
4238 Change highpass width.
4239 Syntax for the command is : "@var{width}"
4242 Change highpass mix.
4243 Syntax for the command is : "@var{mix}"
4248 Join multiple input streams into one multi-channel stream.
4250 It accepts the following parameters:
4254 The number of input streams. It defaults to 2.
4256 @item channel_layout
4257 The desired output channel layout. It defaults to stereo.
4260 Map channels from inputs to output. The argument is a '|'-separated list of
4261 mappings, each in the @code{@var{input_idx}.@var{in_channel}-@var{out_channel}}
4262 form. @var{input_idx} is the 0-based index of the input stream. @var{in_channel}
4263 can be either the name of the input channel (e.g. FL for front left) or its
4264 index in the specified input stream. @var{out_channel} is the name of the output
4268 The filter will attempt to guess the mappings when they are not specified
4269 explicitly. It does so by first trying to find an unused matching input channel
4270 and if that fails it picks the first unused input channel.
4272 Join 3 inputs (with properly set channel layouts):
4274 ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT
4277 Build a 5.1 output from 6 single-channel streams:
4279 ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
4280 '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'
4286 Load a LADSPA (Linux Audio Developer's Simple Plugin API) plugin.
4288 To enable compilation of this filter you need to configure FFmpeg with
4289 @code{--enable-ladspa}.
4293 Specifies the name of LADSPA plugin library to load. If the environment
4294 variable @env{LADSPA_PATH} is defined, the LADSPA plugin is searched in
4295 each one of the directories specified by the colon separated list in
4296 @env{LADSPA_PATH}, otherwise in the standard LADSPA paths, which are in
4297 this order: @file{HOME/.ladspa/lib/}, @file{/usr/local/lib/ladspa/},
4298 @file{/usr/lib/ladspa/}.
4301 Specifies the plugin within the library. Some libraries contain only
4302 one plugin, but others contain many of them. If this is not set filter
4303 will list all available plugins within the specified library.
4306 Set the '|' separated list of controls which are zero or more floating point
4307 values that determine the behavior of the loaded plugin (for example delay,
4309 Controls need to be defined using the following syntax:
4310 c0=@var{value0}|c1=@var{value1}|c2=@var{value2}|..., where
4311 @var{valuei} is the value set on the @var{i}-th control.
4312 Alternatively they can be also defined using the following syntax:
4313 @var{value0}|@var{value1}|@var{value2}|..., where
4314 @var{valuei} is the value set on the @var{i}-th control.
4315 If @option{controls} is set to @code{help}, all available controls and
4316 their valid ranges are printed.
4318 @item sample_rate, s
4319 Specify the sample rate, default to 44100. Only used if plugin have
4323 Set the number of samples per channel per each output frame, default
4324 is 1024. Only used if plugin have zero inputs.
4327 Set the minimum duration of the sourced audio. See
4328 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
4329 for the accepted syntax.
4330 Note that the resulting duration may be greater than the specified duration,
4331 as the generated audio is always cut at the end of a complete frame.
4332 If not specified, or the expressed duration is negative, the audio is
4333 supposed to be generated forever.
4334 Only used if plugin have zero inputs.
4337 Enable latency compensation, by default is disabled.
4338 Only used if plugin have inputs.
4341 @subsection Examples
4345 List all available plugins within amp (LADSPA example plugin) library:
4351 List all available controls and their valid ranges for @code{vcf_notch}
4352 plugin from @code{VCF} library:
4354 ladspa=f=vcf:p=vcf_notch:c=help
4358 Simulate low quality audio equipment using @code{Computer Music Toolkit} (CMT)
4361 ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12
4365 Add reverberation to the audio using TAP-plugins
4366 (Tom's Audio Processing plugins):
4368 ladspa=file=tap_reverb:tap_reverb
4372 Generate white noise, with 0.2 amplitude:
4374 ladspa=file=cmt:noise_source_white:c=c0=.2
4378 Generate 20 bpm clicks using plugin @code{C* Click - Metronome} from the
4379 @code{C* Audio Plugin Suite} (CAPS) library:
4381 ladspa=file=caps:Click:c=c1=20'
4385 Apply @code{C* Eq10X2 - Stereo 10-band equaliser} effect:
4387 ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
4391 Increase volume by 20dB using fast lookahead limiter from Steve Harris
4392 @code{SWH Plugins} collection:
4394 ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:20|0|2
4398 Attenuate low frequencies using Multiband EQ from Steve Harris
4399 @code{SWH Plugins} collection:
4401 ladspa=mbeq_1197:mbeq:-24|-24|-24|0|0|0|0|0|0|0|0|0|0|0|0
4405 Reduce stereo image using @code{Narrower} from the @code{C* Audio Plugin Suite}
4408 ladspa=caps:Narrower
4412 Another white noise, now using @code{C* Audio Plugin Suite} (CAPS) library:
4414 ladspa=caps:White:.2
4418 Some fractal noise, using @code{C* Audio Plugin Suite} (CAPS) library:
4420 ladspa=caps:Fractal:c=c1=1
4424 Dynamic volume normalization using @code{VLevel} plugin:
4426 ladspa=vlevel-ladspa:vlevel_mono
4430 @subsection Commands
4432 This filter supports the following commands:
4435 Modify the @var{N}-th control value.
4437 If the specified value is not valid, it is ignored and prior one is kept.
4442 EBU R128 loudness normalization. Includes both dynamic and linear normalization modes.
4443 Support for both single pass (livestreams, files) and double pass (files) modes.
4444 This algorithm can target IL, LRA, and maximum true peak. In dynamic mode, to accurately
4445 detect true peaks, the audio stream will be upsampled to 192 kHz.
4446 Use the @code{-ar} option or @code{aresample} filter to explicitly set an output sample rate.
4448 The filter accepts the following options:
4452 Set integrated loudness target.
4453 Range is -70.0 - -5.0. Default value is -24.0.
4456 Set loudness range target.
4457 Range is 1.0 - 20.0. Default value is 7.0.
4460 Set maximum true peak.
4461 Range is -9.0 - +0.0. Default value is -2.0.
4463 @item measured_I, measured_i
4464 Measured IL of input file.
4465 Range is -99.0 - +0.0.
4467 @item measured_LRA, measured_lra
4468 Measured LRA of input file.
4469 Range is 0.0 - 99.0.
4471 @item measured_TP, measured_tp
4472 Measured true peak of input file.
4473 Range is -99.0 - +99.0.
4475 @item measured_thresh
4476 Measured threshold of input file.
4477 Range is -99.0 - +0.0.
4480 Set offset gain. Gain is applied before the true-peak limiter.
4481 Range is -99.0 - +99.0. Default is +0.0.
4484 Normalize by linearly scaling the source audio.
4485 @code{measured_I}, @code{measured_LRA}, @code{measured_TP},
4486 and @code{measured_thresh} must all be specified. Target LRA shouldn't
4487 be lower than source LRA and the change in integrated loudness shouldn't
4488 result in a true peak which exceeds the target TP. If any of these
4489 conditions aren't met, normalization mode will revert to @var{dynamic}.
4490 Options are @code{true} or @code{false}. Default is @code{true}.
4493 Treat mono input files as "dual-mono". If a mono file is intended for playback
4494 on a stereo system, its EBU R128 measurement will be perceptually incorrect.
4495 If set to @code{true}, this option will compensate for this effect.
4496 Multi-channel input files are not affected by this option.
4497 Options are true or false. Default is false.
4500 Set print format for stats. Options are summary, json, or none.
4501 Default value is none.
4506 Apply a low-pass filter with 3dB point frequency.
4507 The filter can be either single-pole or double-pole (the default).
4508 The filter roll off at 6dB per pole per octave (20dB per pole per decade).
4510 The filter accepts the following options:
4514 Set frequency in Hz. Default is 500.
4517 Set number of poles. Default is 2.
4520 Set method to specify band-width of filter.
4535 Specify the band-width of a filter in width_type units.
4536 Applies only to double-pole filter.
4537 The default is 0.707q and gives a Butterworth response.
4540 How much to use filtered signal in output. Default is 1.
4541 Range is between 0 and 1.
4544 Specify which channels to filter, by default all available are filtered.
4547 Normalize biquad coefficients, by default is disabled.
4548 Enabling it will normalize magnitude response at DC to 0dB.
4551 Set transform type of IIR filter.
4560 @subsection Examples
4563 Lowpass only LFE channel, it LFE is not present it does nothing:
4569 @subsection Commands
4571 This filter supports the following commands:
4574 Change lowpass frequency.
4575 Syntax for the command is : "@var{frequency}"
4578 Change lowpass width_type.
4579 Syntax for the command is : "@var{width_type}"
4582 Change lowpass width.
4583 Syntax for the command is : "@var{width}"
4587 Syntax for the command is : "@var{mix}"
4592 Load a LV2 (LADSPA Version 2) plugin.
4594 To enable compilation of this filter you need to configure FFmpeg with
4595 @code{--enable-lv2}.
4599 Specifies the plugin URI. You may need to escape ':'.
4602 Set the '|' separated list of controls which are zero or more floating point
4603 values that determine the behavior of the loaded plugin (for example delay,
4605 If @option{controls} is set to @code{help}, all available controls and
4606 their valid ranges are printed.
4608 @item sample_rate, s
4609 Specify the sample rate, default to 44100. Only used if plugin have
4613 Set the number of samples per channel per each output frame, default
4614 is 1024. Only used if plugin have zero inputs.
4617 Set the minimum duration of the sourced audio. See
4618 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
4619 for the accepted syntax.
4620 Note that the resulting duration may be greater than the specified duration,
4621 as the generated audio is always cut at the end of a complete frame.
4622 If not specified, or the expressed duration is negative, the audio is
4623 supposed to be generated forever.
4624 Only used if plugin have zero inputs.
4627 @subsection Examples
4631 Apply bass enhancer plugin from Calf:
4633 lv2=p=http\\\\://calf.sourceforge.net/plugins/BassEnhancer:c=amount=2
4637 Apply vinyl plugin from Calf:
4639 lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5
4643 Apply bit crusher plugin from ArtyFX:
4645 lv2=p=http\\\\://www.openavproductions.com/artyfx#bitta:c=crush=0.3
4650 Multiband Compress or expand the audio's dynamic range.
4652 The input audio is divided into bands using 4th order Linkwitz-Riley IIRs.
4653 This is akin to the crossover of a loudspeaker, and results in flat frequency
4654 response when absent compander action.
4656 It accepts the following parameters:
4660 This option syntax is:
4661 attack,decay,[attack,decay..] soft-knee points crossover_frequency [delay [initial_volume [gain]]] | attack,decay ...
4662 For explanation of each item refer to compand filter documentation.
4668 Mix channels with specific gain levels. The filter accepts the output
4669 channel layout followed by a set of channels definitions.
4671 This filter is also designed to efficiently remap the channels of an audio
4674 The filter accepts parameters of the form:
4675 "@var{l}|@var{outdef}|@var{outdef}|..."
4679 output channel layout or number of channels
4682 output channel specification, of the form:
4683 "@var{out_name}=[@var{gain}*]@var{in_name}[(+-)[@var{gain}*]@var{in_name}...]"
4686 output channel to define, either a channel name (FL, FR, etc.) or a channel
4687 number (c0, c1, etc.)
4690 multiplicative coefficient for the channel, 1 leaving the volume unchanged
4693 input channel to use, see out_name for details; it is not possible to mix
4694 named and numbered input channels
4697 If the `=' in a channel specification is replaced by `<', then the gains for
4698 that specification will be renormalized so that the total is 1, thus
4699 avoiding clipping noise.
4701 @subsection Mixing examples
4703 For example, if you want to down-mix from stereo to mono, but with a bigger
4704 factor for the left channel:
4706 pan=1c|c0=0.9*c0+0.1*c1
4709 A customized down-mix to stereo that works automatically for 3-, 4-, 5- and
4710 7-channels surround:
4712 pan=stereo| FL < FL + 0.5*FC + 0.6*BL + 0.6*SL | FR < FR + 0.5*FC + 0.6*BR + 0.6*SR
4715 Note that @command{ffmpeg} integrates a default down-mix (and up-mix) system
4716 that should be preferred (see "-ac" option) unless you have very specific
4719 @subsection Remapping examples
4721 The channel remapping will be effective if, and only if:
4724 @item gain coefficients are zeroes or ones,
4725 @item only one input per channel output,
4728 If all these conditions are satisfied, the filter will notify the user ("Pure
4729 channel mapping detected"), and use an optimized and lossless method to do the
4732 For example, if you have a 5.1 source and want a stereo audio stream by
4733 dropping the extra channels:
4735 pan="stereo| c0=FL | c1=FR"
4738 Given the same source, you can also switch front left and front right channels
4739 and keep the input channel layout:
4741 pan="5.1| c0=c1 | c1=c0 | c2=c2 | c3=c3 | c4=c4 | c5=c5"
4744 If the input is a stereo audio stream, you can mute the front left channel (and
4745 still keep the stereo channel layout) with:
4750 Still with a stereo audio stream input, you can copy the right channel in both
4751 front left and right:
4753 pan="stereo| c0=FR | c1=FR"
4758 ReplayGain scanner filter. This filter takes an audio stream as an input and
4759 outputs it unchanged.
4760 At end of filtering it displays @code{track_gain} and @code{track_peak}.
4764 Convert the audio sample format, sample rate and channel layout. It is
4765 not meant to be used directly.
4768 Apply time-stretching and pitch-shifting with librubberband.
4770 To enable compilation of this filter, you need to configure FFmpeg with
4771 @code{--enable-librubberband}.
4773 The filter accepts the following options:
4777 Set tempo scale factor.
4780 Set pitch scale factor.
4783 Set transients detector.
4784 Possible values are:
4793 Possible values are:
4802 Possible values are:
4809 Set processing window size.
4810 Possible values are:
4819 Possible values are:
4826 Enable formant preservation when shift pitching.
4827 Possible values are:
4835 Possible values are:
4844 Possible values are:
4851 @subsection Commands
4853 This filter supports the following commands:
4856 Change filter tempo scale factor.
4857 Syntax for the command is : "@var{tempo}"
4860 Change filter pitch scale factor.
4861 Syntax for the command is : "@var{pitch}"
4864 @section sidechaincompress
4866 This filter acts like normal compressor but has the ability to compress
4867 detected signal using second input signal.
4868 It needs two input streams and returns one output stream.
4869 First input stream will be processed depending on second stream signal.
4870 The filtered signal then can be filtered with other filters in later stages of
4871 processing. See @ref{pan} and @ref{amerge} filter.
4873 The filter accepts the following options:
4877 Set input gain. Default is 1. Range is between 0.015625 and 64.
4880 Set mode of compressor operation. Can be @code{upward} or @code{downward}.
4881 Default is @code{downward}.
4884 If a signal of second stream raises above this level it will affect the gain
4885 reduction of first stream.
4886 By default is 0.125. Range is between 0.00097563 and 1.
4889 Set a ratio about which the signal is reduced. 1:2 means that if the level
4890 raised 4dB above the threshold, it will be only 2dB above after the reduction.
4891 Default is 2. Range is between 1 and 20.
4894 Amount of milliseconds the signal has to rise above the threshold before gain
4895 reduction starts. Default is 20. Range is between 0.01 and 2000.
4898 Amount of milliseconds the signal has to fall below the threshold before
4899 reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
4902 Set the amount by how much signal will be amplified after processing.
4903 Default is 1. Range is from 1 to 64.
4906 Curve the sharp knee around the threshold to enter gain reduction more softly.
4907 Default is 2.82843. Range is between 1 and 8.
4910 Choose if the @code{average} level between all channels of side-chain stream
4911 or the louder(@code{maximum}) channel of side-chain stream affects the
4912 reduction. Default is @code{average}.
4915 Should the exact signal be taken in case of @code{peak} or an RMS one in case
4916 of @code{rms}. Default is @code{rms} which is mainly smoother.
4919 Set sidechain gain. Default is 1. Range is between 0.015625 and 64.
4922 How much to use compressed signal in output. Default is 1.
4923 Range is between 0 and 1.
4926 @subsection Commands
4928 This filter supports the all above options as @ref{commands}.
4930 @subsection Examples
4934 Full ffmpeg example taking 2 audio inputs, 1st input to be compressed
4935 depending on the signal of 2nd input and later compressed signal to be
4936 merged with 2nd input:
4938 ffmpeg -i main.flac -i sidechain.flac -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge"
4942 @section sidechaingate
4944 A sidechain gate acts like a normal (wideband) gate but has the ability to
4945 filter the detected signal before sending it to the gain reduction stage.
4946 Normally a gate uses the full range signal to detect a level above the
4948 For example: If you cut all lower frequencies from your sidechain signal
4949 the gate will decrease the volume of your track only if not enough highs
4950 appear. With this technique you are able to reduce the resonation of a
4951 natural drum or remove "rumbling" of muted strokes from a heavily distorted
4953 It needs two input streams and returns one output stream.
4954 First input stream will be processed depending on second stream signal.
4956 The filter accepts the following options:
4960 Set input level before filtering.
4961 Default is 1. Allowed range is from 0.015625 to 64.
4964 Set the mode of operation. Can be @code{upward} or @code{downward}.
4965 Default is @code{downward}. If set to @code{upward} mode, higher parts of signal
4966 will be amplified, expanding dynamic range in upward direction.
4967 Otherwise, in case of @code{downward} lower parts of signal will be reduced.
4970 Set the level of gain reduction when the signal is below the threshold.
4971 Default is 0.06125. Allowed range is from 0 to 1.
4972 Setting this to 0 disables reduction and then filter behaves like expander.
4975 If a signal rises above this level the gain reduction is released.
4976 Default is 0.125. Allowed range is from 0 to 1.
4979 Set a ratio about which the signal is reduced.
4980 Default is 2. Allowed range is from 1 to 9000.
4983 Amount of milliseconds the signal has to rise above the threshold before gain
4985 Default is 20 milliseconds. Allowed range is from 0.01 to 9000.
4988 Amount of milliseconds the signal has to fall below the threshold before the
4989 reduction is increased again. Default is 250 milliseconds.
4990 Allowed range is from 0.01 to 9000.
4993 Set amount of amplification of signal after processing.
4994 Default is 1. Allowed range is from 1 to 64.
4997 Curve the sharp knee around the threshold to enter gain reduction more softly.
4998 Default is 2.828427125. Allowed range is from 1 to 8.
5001 Choose if exact signal should be taken for detection or an RMS like one.
5002 Default is rms. Can be peak or rms.
5005 Choose if the average level between all channels or the louder channel affects
5007 Default is average. Can be average or maximum.
5010 Set sidechain gain. Default is 1. Range is from 0.015625 to 64.
5013 @section silencedetect
5015 Detect silence in an audio stream.
5017 This filter logs a message when it detects that the input audio volume is less
5018 or equal to a noise tolerance value for a duration greater or equal to the
5019 minimum detected noise duration.
5021 The printed times and duration are expressed in seconds. The
5022 @code{lavfi.silence_start} or @code{lavfi.silence_start.X} metadata key
5023 is set on the first frame whose timestamp equals or exceeds the detection
5024 duration and it contains the timestamp of the first frame of the silence.
5026 The @code{lavfi.silence_duration} or @code{lavfi.silence_duration.X}
5027 and @code{lavfi.silence_end} or @code{lavfi.silence_end.X} metadata
5028 keys are set on the first frame after the silence. If @option{mono} is
5029 enabled, and each channel is evaluated separately, the @code{.X}
5030 suffixed keys are used, and @code{X} corresponds to the channel number.
5032 The filter accepts the following options:
5036 Set noise tolerance. Can be specified in dB (in case "dB" is appended to the
5037 specified value) or amplitude ratio. Default is -60dB, or 0.001.
5040 Set silence duration until notification (default is 2 seconds). See
5041 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
5042 for the accepted syntax.
5045 Process each channel separately, instead of combined. By default is disabled.
5048 @subsection Examples
5052 Detect 5 seconds of silence with -50dB noise tolerance:
5054 silencedetect=n=-50dB:d=5
5058 Complete example with @command{ffmpeg} to detect silence with 0.0001 noise
5059 tolerance in @file{silence.mp3}:
5061 ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null -
5065 @section silenceremove
5067 Remove silence from the beginning, middle or end of the audio.
5069 The filter accepts the following options:
5073 This value is used to indicate if audio should be trimmed at beginning of
5074 the audio. A value of zero indicates no silence should be trimmed from the
5075 beginning. When specifying a non-zero value, it trims audio up until it
5076 finds non-silence. Normally, when trimming silence from beginning of audio
5077 the @var{start_periods} will be @code{1} but it can be increased to higher
5078 values to trim all audio up to specific count of non-silence periods.
5079 Default value is @code{0}.
5081 @item start_duration
5082 Specify the amount of time that non-silence must be detected before it stops
5083 trimming audio. By increasing the duration, bursts of noises can be treated
5084 as silence and trimmed off. Default value is @code{0}.
5086 @item start_threshold
5087 This indicates what sample value should be treated as silence. For digital
5088 audio, a value of @code{0} may be fine but for audio recorded from analog,
5089 you may wish to increase the value to account for background noise.
5090 Can be specified in dB (in case "dB" is appended to the specified value)
5091 or amplitude ratio. Default value is @code{0}.
5094 Specify max duration of silence at beginning that will be kept after
5095 trimming. Default is 0, which is equal to trimming all samples detected
5099 Specify mode of detection of silence end in start of multi-channel audio.
5100 Can be @var{any} or @var{all}. Default is @var{any}.
5101 With @var{any}, any sample that is detected as non-silence will cause
5102 stopped trimming of silence.
5103 With @var{all}, only if all channels are detected as non-silence will cause
5104 stopped trimming of silence.