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 B/numerator/zeros/reflection coefficients.
1442 Set A/denominator/poles/ladder coefficients.
1454 Set coefficients format.
1458 lattice-ladder function
1460 analog transfer function
1462 digital transfer function
1464 Z-plane zeros/poles, cartesian (default)
1466 Z-plane zeros/poles, polar radians
1468 Z-plane zeros/poles, polar degrees
1474 Set type of processing.
1486 Set filtering precision.
1490 double-precision floating-point (default)
1492 single-precision floating-point
1500 Normalize filter coefficients, by default is enabled.
1501 Enabling it will normalize magnitude response at DC to 0dB.
1504 How much to use filtered signal in output. Default is 1.
1505 Range is between 0 and 1.
1508 Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream.
1509 By default it is disabled.
1512 Set for which IR channel to display frequency response. By default is first channel
1513 displayed. This option is used only when @var{response} is enabled.
1516 Set video stream size. This option is used only when @var{response} is enabled.
1519 Coefficients in @code{tf} and @code{sf} format are separated by spaces and are in ascending
1522 Coefficients in @code{zp} format are separated by spaces and order of coefficients
1523 doesn't matter. Coefficients in @code{zp} format are complex numbers with @var{i}
1526 Different coefficients and gains can be provided for every channel, in such case
1527 use '|' to separate coefficients or gains. Last provided coefficients will be
1528 used for all remaining channels.
1530 @subsection Examples
1534 Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample rate:
1536 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
1540 Same as above but in @code{zp} format:
1542 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
1546 Apply 3-rd order analog normalized Butterworth low-pass filter, using analog transfer function format:
1548 aiir=z=1.3057 0 0 0:p=1.3057 2.3892 2.1860 1:f=sf:r=d
1554 The limiter prevents an input signal from rising over a desired threshold.
1555 This limiter uses lookahead technology to prevent your signal from distorting.
1556 It means that there is a small delay after the signal is processed. Keep in mind
1557 that the delay it produces is the attack time you set.
1559 The filter accepts the following options:
1563 Set input gain. Default is 1.
1566 Set output gain. Default is 1.
1569 Don't let signals above this level pass the limiter. Default is 1.
1572 The limiter will reach its attenuation level in this amount of time in
1573 milliseconds. Default is 5 milliseconds.
1576 Come back from limiting to attenuation 1.0 in this amount of milliseconds.
1577 Default is 50 milliseconds.
1580 When gain reduction is always needed ASC takes care of releasing to an
1581 average reduction level rather than reaching a reduction of 0 in the release
1585 Select how much the release time is affected by ASC, 0 means nearly no changes
1586 in release time while 1 produces higher release times.
1589 Auto level output signal. Default is enabled.
1590 This normalizes audio back to 0dB if enabled.
1593 Depending on picked setting it is recommended to upsample input 2x or 4x times
1594 with @ref{aresample} before applying this filter.
1598 Apply a two-pole all-pass filter with central frequency (in Hz)
1599 @var{frequency}, and filter-width @var{width}.
1600 An all-pass filter changes the audio's frequency to phase relationship
1601 without changing its frequency to amplitude relationship.
1603 The filter accepts the following options:
1607 Set frequency in Hz.
1610 Set method to specify band-width of filter.
1625 Specify the band-width of a filter in width_type units.
1628 How much to use filtered signal in output. Default is 1.
1629 Range is between 0 and 1.
1632 Specify which channels to filter, by default all available are filtered.
1635 Normalize biquad coefficients, by default is disabled.
1636 Enabling it will normalize magnitude response at DC to 0dB.
1639 Set the filter order, can be 1 or 2. Default is 2.
1642 Set transform type of IIR filter.
1651 @subsection Commands
1653 This filter supports the following commands:
1656 Change allpass frequency.
1657 Syntax for the command is : "@var{frequency}"
1660 Change allpass width_type.
1661 Syntax for the command is : "@var{width_type}"
1664 Change allpass width.
1665 Syntax for the command is : "@var{width}"
1669 Syntax for the command is : "@var{mix}"
1676 The filter accepts the following options:
1680 Set the number of loops. Setting this value to -1 will result in infinite loops.
1684 Set maximal number of samples. Default is 0.
1687 Set first sample of loop. Default is 0.
1693 Merge two or more audio streams into a single multi-channel stream.
1695 The filter accepts the following options:
1700 Set the number of inputs. Default is 2.
1704 If the channel layouts of the inputs are disjoint, and therefore compatible,
1705 the channel layout of the output will be set accordingly and the channels
1706 will be reordered as necessary. If the channel layouts of the inputs are not
1707 disjoint, the output will have all the channels of the first input then all
1708 the channels of the second input, in that order, and the channel layout of
1709 the output will be the default value corresponding to the total number of
1712 For example, if the first input is in 2.1 (FL+FR+LF) and the second input
1713 is FC+BL+BR, then the output will be in 5.1, with the channels in the
1714 following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of the
1715 first input, b1 is the first channel of the second input).
1717 On the other hand, if both input are in stereo, the output channels will be
1718 in the default order: a1, a2, b1, b2, and the channel layout will be
1719 arbitrarily set to 4.0, which may or may not be the expected value.
1721 All inputs must have the same sample rate, and format.
1723 If inputs do not have the same duration, the output will stop with the
1726 @subsection Examples
1730 Merge two mono files into a stereo stream:
1732 amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
1736 Multiple merges assuming 1 video stream and 6 audio streams in @file{input.mkv}:
1738 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
1744 Mixes multiple audio inputs into a single output.
1746 Note that this filter only supports float samples (the @var{amerge}
1747 and @var{pan} audio filters support many formats). If the @var{amix}
1748 input has integer samples then @ref{aresample} will be automatically
1749 inserted to perform the conversion to float samples.
1753 ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
1755 will mix 3 input audio streams to a single output with the same duration as the
1756 first input and a dropout transition time of 3 seconds.
1758 It accepts the following parameters:
1762 The number of inputs. If unspecified, it defaults to 2.
1765 How to determine the end-of-stream.
1769 The duration of the longest input. (default)
1772 The duration of the shortest input.
1775 The duration of the first input.
1779 @item dropout_transition
1780 The transition time, in seconds, for volume renormalization when an input
1781 stream ends. The default value is 2 seconds.
1784 Specify weight of each input audio stream as sequence.
1785 Each weight is separated by space. By default all inputs have same weight.
1788 @subsection Commands
1790 This filter supports the following commands:
1793 Syntax is same as option with same name.
1798 Multiply first audio stream with second audio stream and store result
1799 in output audio stream. Multiplication is done by multiplying each
1800 sample from first stream with sample at same position from second stream.
1802 With this element-wise multiplication one can create amplitude fades and
1803 amplitude modulations.
1805 @section anequalizer
1807 High-order parametric multiband equalizer for each channel.
1809 It accepts the following parameters:
1813 This option string is in format:
1814 "c@var{chn} f=@var{cf} w=@var{w} g=@var{g} t=@var{f} | ..."
1815 Each equalizer band is separated by '|'.
1819 Set channel number to which equalization will be applied.
1820 If input doesn't have that channel the entry is ignored.
1823 Set central frequency for band.
1824 If input doesn't have that frequency the entry is ignored.
1827 Set band width in hertz.
1830 Set band gain in dB.
1833 Set filter type for band, optional, can be:
1837 Butterworth, this is default.
1848 With this option activated frequency response of anequalizer is displayed
1852 Set video stream size. Only useful if curves option is activated.
1855 Set max gain that will be displayed. Only useful if curves option is activated.
1856 Setting this to a reasonable value makes it possible to display gain which is derived from
1857 neighbour bands which are too close to each other and thus produce higher gain
1858 when both are activated.
1861 Set frequency scale used to draw frequency response in video output.
1862 Can be linear or logarithmic. Default is logarithmic.
1865 Set color for each channel curve which is going to be displayed in video stream.
1866 This is list of color names separated by space or by '|'.
1867 Unrecognised or missing colors will be replaced by white color.
1870 @subsection Examples
1874 Lower gain by 10 of central frequency 200Hz and width 100 Hz
1875 for first 2 channels using Chebyshev type 1 filter:
1877 anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
1881 @subsection Commands
1883 This filter supports the following commands:
1886 Alter existing filter parameters.
1887 Syntax for the commands is : "@var{fN}|f=@var{freq}|w=@var{width}|g=@var{gain}"
1889 @var{fN} is existing filter number, starting from 0, if no such filter is available
1891 @var{freq} set new frequency parameter.
1892 @var{width} set new width parameter in herz.
1893 @var{gain} set new gain parameter in dB.
1895 Full filter invocation with asendcmd may look like this:
1896 asendcmd=c='4.0 anequalizer change 0|f=200|w=50|g=1',anequalizer=...
1901 Reduce broadband noise in audio samples using Non-Local Means algorithm.
1903 Each sample is adjusted by looking for other samples with similar contexts. This
1904 context similarity is defined by comparing their surrounding patches of size
1905 @option{p}. Patches are searched in an area of @option{r} around the sample.
1907 The filter accepts the following options:
1911 Set denoising strength. Allowed range is from 0.00001 to 10. Default value is 0.00001.
1914 Set patch radius duration. Allowed range is from 1 to 100 milliseconds.
1915 Default value is 2 milliseconds.
1918 Set research radius duration. Allowed range is from 2 to 300 milliseconds.
1919 Default value is 6 milliseconds.
1922 Set the output mode.
1924 It accepts the following values:
1927 Pass input unchanged.
1930 Pass noise filtered out.
1935 Default value is @var{o}.
1939 Set smooth factor. Default value is @var{11}. Allowed range is from @var{1} to @var{15}.
1942 @subsection Commands
1944 This filter supports the all above options as @ref{commands}.
1947 Apply Normalized Least-Mean-Squares algorithm to the first audio stream using the second audio stream.
1949 This adaptive filter is used to mimic a desired filter by finding the filter coefficients that
1950 relate to producing the least mean square of the error signal (difference between the desired,
1951 2nd input audio stream and the actual signal, the 1st input audio stream).
1953 A description of the accepted options follows.
1966 Set the filter leakage.
1969 It accepts the following values:
1978 Pass filtered samples.
1981 Pass difference between desired and filtered samples.
1983 Default value is @var{o}.
1987 @subsection Examples
1991 One of many usages of this filter is noise reduction, input audio is filtered
1992 with same samples that are delayed by fixed amount, one such example for stereo audio is:
1994 asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
1998 @subsection Commands
2000 This filter supports the same commands as options, excluding option @code{order}.
2004 Pass the audio source unchanged to the output.
2008 Pad the end of an audio stream with silence.
2010 This can be used together with @command{ffmpeg} @option{-shortest} to
2011 extend audio streams to the same length as the video stream.
2013 A description of the accepted options follows.
2017 Set silence packet size. Default value is 4096.
2020 Set the number of samples of silence to add to the end. After the
2021 value is reached, the stream is terminated. This option is mutually
2022 exclusive with @option{whole_len}.
2025 Set the minimum total number of samples in the output audio stream. If
2026 the value is longer than the input audio length, silence is added to
2027 the end, until the value is reached. This option is mutually exclusive
2028 with @option{pad_len}.
2031 Specify the duration of samples of silence to add. See
2032 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
2033 for the accepted syntax. Used only if set to non-zero value.
2036 Specify the minimum total duration in the output audio stream. See
2037 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
2038 for the accepted syntax. Used only if set to non-zero value. If the value is longer than
2039 the input audio length, silence is added to the end, until the value is reached.
2040 This option is mutually exclusive with @option{pad_dur}
2043 If neither the @option{pad_len} nor the @option{whole_len} nor @option{pad_dur}
2044 nor @option{whole_dur} option is set, the filter will add silence to the end of
2045 the input stream indefinitely.
2047 @subsection Examples
2051 Add 1024 samples of silence to the end of the input:
2057 Make sure the audio output will contain at least 10000 samples, pad
2058 the input with silence if required:
2060 apad=whole_len=10000
2064 Use @command{ffmpeg} to pad the audio input with silence, so that the
2065 video stream will always result the shortest and will be converted
2066 until the end in the output file when using the @option{shortest}
2069 ffmpeg -i VIDEO -i AUDIO -filter_complex "[1:0]apad" -shortest OUTPUT
2074 Add a phasing effect to the input audio.
2076 A phaser filter creates series of peaks and troughs in the frequency spectrum.
2077 The position of the peaks and troughs are modulated so that they vary over time, creating a sweeping effect.
2079 A description of the accepted parameters follows.
2083 Set input gain. Default is 0.4.
2086 Set output gain. Default is 0.74
2089 Set delay in milliseconds. Default is 3.0.
2092 Set decay. Default is 0.4.
2095 Set modulation speed in Hz. Default is 0.5.
2098 Set modulation type. Default is triangular.
2100 It accepts the following values:
2107 @section aphaseshift
2108 Apply phase shift to input audio samples.
2110 The filter accepts the following options:
2114 Specify phase shift. Allowed range is from -1.0 to 1.0.
2115 Default value is 0.0.
2118 @subsection Commands
2120 This filter supports the above option as @ref{commands}.
2124 Audio pulsator is something between an autopanner and a tremolo.
2125 But it can produce funny stereo effects as well. Pulsator changes the volume
2126 of the left and right channel based on a LFO (low frequency oscillator) with
2127 different waveforms and shifted phases.
2128 This filter have the ability to define an offset between left and right
2129 channel. An offset of 0 means that both LFO shapes match each other.
2130 The left and right channel are altered equally - a conventional tremolo.
2131 An offset of 50% means that the shape of the right channel is exactly shifted
2132 in phase (or moved backwards about half of the frequency) - pulsator acts as
2133 an autopanner. At 1 both curves match again. Every setting in between moves the
2134 phase shift gapless between all stages and produces some "bypassing" sounds with
2135 sine and triangle waveforms. The more you set the offset near 1 (starting from
2136 the 0.5) the faster the signal passes from the left to the right speaker.
2138 The filter accepts the following options:
2142 Set input gain. By default it is 1. Range is [0.015625 - 64].
2145 Set output gain. By default it is 1. Range is [0.015625 - 64].
2148 Set waveform shape the LFO will use. Can be one of: sine, triangle, square,
2149 sawup or sawdown. Default is sine.
2152 Set modulation. Define how much of original signal is affected by the LFO.
2155 Set left channel offset. Default is 0. Allowed range is [0 - 1].
2158 Set right channel offset. Default is 0.5. Allowed range is [0 - 1].
2161 Set pulse width. Default is 1. Allowed range is [0 - 2].
2164 Set possible timing mode. Can be one of: bpm, ms or hz. Default is hz.
2167 Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if timing
2171 Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if timing
2175 Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100]. Only used
2176 if timing is set to hz.
2182 Resample the input audio to the specified parameters, using the
2183 libswresample library. If none are specified then the filter will
2184 automatically convert between its input and output.
2186 This filter is also able to stretch/squeeze the audio data to make it match
2187 the timestamps or to inject silence / cut out audio to make it match the
2188 timestamps, do a combination of both or do neither.
2190 The filter accepts the syntax
2191 [@var{sample_rate}:]@var{resampler_options}, where @var{sample_rate}
2192 expresses a sample rate and @var{resampler_options} is a list of
2193 @var{key}=@var{value} pairs, separated by ":". See the
2194 @ref{Resampler Options,,"Resampler Options" section in the
2195 ffmpeg-resampler(1) manual,ffmpeg-resampler}
2196 for the complete list of supported options.
2198 @subsection Examples
2202 Resample the input audio to 44100Hz:
2208 Stretch/squeeze samples to the given timestamps, with a maximum of 1000
2209 samples per second compensation:
2211 aresample=async=1000
2217 Reverse an audio clip.
2219 Warning: This filter requires memory to buffer the entire clip, so trimming
2222 @subsection Examples
2226 Take the first 5 seconds of a clip, and reverse it.
2228 atrim=end=5,areverse
2234 Reduce noise from speech using Recurrent Neural Networks.
2236 This filter accepts the following options:
2240 Set train model file to load. This option is always required.
2243 @section asetnsamples
2245 Set the number of samples per each output audio frame.
2247 The last output packet may contain a different number of samples, as
2248 the filter will flush all the remaining samples when the input audio
2251 The filter accepts the following options:
2255 @item nb_out_samples, n
2256 Set the number of frames per each output audio frame. The number is
2257 intended as the number of samples @emph{per each channel}.
2258 Default value is 1024.
2261 If set to 1, the filter will pad the last audio frame with zeroes, so
2262 that the last frame will contain the same number of samples as the
2263 previous ones. Default value is 1.
2266 For example, to set the number of per-frame samples to 1234 and
2267 disable padding for the last frame, use:
2269 asetnsamples=n=1234:p=0
2274 Set the sample rate without altering the PCM data.
2275 This will result in a change of speed and pitch.
2277 The filter accepts the following options:
2280 @item sample_rate, r
2281 Set the output sample rate. Default is 44100 Hz.
2286 Show a line containing various information for each input audio frame.
2287 The input audio is not modified.
2289 The shown line contains a sequence of key/value pairs of the form
2290 @var{key}:@var{value}.
2292 The following values are shown in the output:
2296 The (sequential) number of the input frame, starting from 0.
2299 The presentation timestamp of the input frame, in time base units; the time base
2300 depends on the filter input pad, and is usually 1/@var{sample_rate}.
2303 The presentation timestamp of the input frame in seconds.
2306 position of the frame in the input stream, -1 if this information in
2307 unavailable and/or meaningless (for example in case of synthetic audio)
2316 The sample rate for the audio frame.
2319 The number of samples (per channel) in the frame.
2322 The Adler-32 checksum (printed in hexadecimal) of the audio data. For planar
2323 audio, the data is treated as if all the planes were concatenated.
2325 @item plane_checksums
2326 A list of Adler-32 checksums for each data plane.
2330 Apply audio soft clipping.
2332 Soft clipping is a type of distortion effect where the amplitude of a signal is saturated
2333 along a smooth curve, rather than the abrupt shape of hard-clipping.
2335 This filter accepts the following options:
2339 Set type of soft-clipping.
2341 It accepts the following values:
2355 Set additional parameter which controls sigmoid function.
2358 Set oversampling factor.
2361 @subsection Commands
2363 This filter supports the all above options as @ref{commands}.
2366 Automatic Speech Recognition
2368 This filter uses PocketSphinx for speech recognition. To enable
2369 compilation of this filter, you need to configure FFmpeg with
2370 @code{--enable-pocketsphinx}.
2372 It accepts the following options:
2376 Set sampling rate of input audio. Defaults is @code{16000}.
2377 This need to match speech models, otherwise one will get poor results.
2380 Set dictionary containing acoustic model files.
2383 Set pronunciation dictionary.
2386 Set language model file.
2389 Set language model set.
2392 Set which language model to use.
2395 Set output for log messages.
2398 The filter exports recognized speech as the frame metadata @code{lavfi.asr.text}.
2403 Display time domain statistical information about the audio channels.
2404 Statistics are calculated and displayed for each audio channel and,
2405 where applicable, an overall figure is also given.
2407 It accepts the following option:
2410 Short window length in seconds, used for peak and trough RMS measurement.
2411 Default is @code{0.05} (50 milliseconds). Allowed range is @code{[0.01 - 10]}.
2415 Set metadata injection. All the metadata keys are prefixed with @code{lavfi.astats.X},
2416 where @code{X} is channel number starting from 1 or string @code{Overall}. Default is
2419 Available keys for each channel are:
2465 For example full key look like this @code{lavfi.astats.1.DC_offset} or
2466 this @code{lavfi.astats.Overall.Peak_count}.
2468 For description what each key means read below.
2471 Set number of frame after which stats are going to be recalculated.
2472 Default is disabled.
2474 @item measure_perchannel
2475 Select the entries which need to be measured per channel. The metadata keys can
2476 be used as flags, default is @option{all} which measures everything.
2477 @option{none} disables all per channel measurement.
2479 @item measure_overall
2480 Select the entries which need to be measured overall. The metadata keys can
2481 be used as flags, default is @option{all} which measures everything.
2482 @option{none} disables all overall measurement.
2486 A description of each shown parameter follows:
2490 Mean amplitude displacement from zero.
2493 Minimal sample level.
2496 Maximal sample level.
2498 @item Min difference
2499 Minimal difference between two consecutive samples.
2501 @item Max difference
2502 Maximal difference between two consecutive samples.
2504 @item Mean difference
2505 Mean difference between two consecutive samples.
2506 The average of each difference between two consecutive samples.
2508 @item RMS difference
2509 Root Mean Square difference between two consecutive samples.
2513 Standard peak and RMS level measured in dBFS.
2517 Peak and trough values for RMS level measured over a short window.
2520 Standard ratio of peak to RMS level (note: not in dB).
2523 Flatness (i.e. consecutive samples with the same value) of the signal at its peak levels
2524 (i.e. either @var{Min level} or @var{Max level}).
2527 Number of occasions (not the number of samples) that the signal attained either
2528 @var{Min level} or @var{Max level}.
2530 @item Noise floor dB
2531 Minimum local peak measured in dBFS over a short window.
2533 @item Noise floor count
2534 Number of occasions (not the number of samples) that the signal attained
2538 Overall bit depth of audio. Number of bits used for each sample.
2541 Measured dynamic range of audio in dB.
2543 @item Zero crossings
2544 Number of points where the waveform crosses the zero level axis.
2546 @item Zero crossings rate
2547 Rate of Zero crossings and number of audio samples.
2551 Boost subwoofer frequencies.
2553 The filter accepts the following options:
2557 Set dry gain, how much of original signal is kept. Allowed range is from 0 to 1.
2558 Default value is 0.5.
2561 Set wet gain, how much of filtered signal is kept. Allowed range is from 0 to 1.
2562 Default value is 0.8.
2565 Set delay line decay gain value. Allowed range is from 0 to 1.
2566 Default value is 0.7.
2569 Set delay line feedback gain value. Allowed range is from 0 to 1.
2570 Default value is 0.5.
2573 Set cutoff frequency in herz. Allowed range is 50 to 900.
2574 Default value is 100.
2577 Set slope amount for cutoff frequency. Allowed range is 0.0001 to 1.
2578 Default value is 0.5.
2581 Set delay. Allowed range is from 1 to 100.
2582 Default value is 20.
2585 @subsection Commands
2587 This filter supports the all above options as @ref{commands}.
2593 The filter accepts exactly one parameter, the audio tempo. If not
2594 specified then the filter will assume nominal 1.0 tempo. Tempo must
2595 be in the [0.5, 100.0] range.
2597 Note that tempo greater than 2 will skip some samples rather than
2598 blend them in. If for any reason this is a concern it is always
2599 possible to daisy-chain several instances of atempo to achieve the
2600 desired product tempo.
2602 @subsection Examples
2606 Slow down audio to 80% tempo:
2612 To speed up audio to 300% tempo:
2618 To speed up audio to 300% tempo by daisy-chaining two atempo instances:
2620 atempo=sqrt(3),atempo=sqrt(3)
2624 @subsection Commands
2626 This filter supports the following commands:
2629 Change filter tempo scale factor.
2630 Syntax for the command is : "@var{tempo}"
2635 Trim the input so that the output contains one continuous subpart of the input.
2637 It accepts the following parameters:
2640 Timestamp (in seconds) of the start of the section to keep. I.e. the audio
2641 sample with the timestamp @var{start} will be the first sample in the output.
2644 Specify time of the first audio sample that will be dropped, i.e. the
2645 audio sample immediately preceding the one with the timestamp @var{end} will be
2646 the last sample in the output.
2649 Same as @var{start}, except this option sets the start timestamp in samples
2653 Same as @var{end}, except this option sets the end timestamp in samples instead
2657 The maximum duration of the output in seconds.
2660 The number of the first sample that should be output.
2663 The number of the first sample that should be dropped.
2666 @option{start}, @option{end}, and @option{duration} are expressed as time
2667 duration specifications; see
2668 @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
2670 Note that the first two sets of the start/end options and the @option{duration}
2671 option look at the frame timestamp, while the _sample options simply count the
2672 samples that pass through the filter. So start/end_pts and start/end_sample will
2673 give different results when the timestamps are wrong, inexact or do not start at
2674 zero. Also note that this filter does not modify the timestamps. If you wish
2675 to have the output timestamps start at zero, insert the asetpts filter after the
2678 If multiple start or end options are set, this filter tries to be greedy and
2679 keep all samples that match at least one of the specified constraints. To keep
2680 only the part that matches all the constraints at once, chain multiple atrim
2683 The defaults are such that all the input is kept. So it is possible to set e.g.
2684 just the end values to keep everything before the specified time.
2689 Drop everything except the second minute of input:
2691 ffmpeg -i INPUT -af atrim=60:120
2695 Keep only the first 1000 samples:
2697 ffmpeg -i INPUT -af atrim=end_sample=1000
2702 @section axcorrelate
2703 Calculate normalized cross-correlation between two input audio streams.
2705 Resulted samples are always between -1 and 1 inclusive.
2706 If result is 1 it means two input samples are highly correlated in that selected segment.
2707 Result 0 means they are not correlated at all.
2708 If result is -1 it means two input samples are out of phase, which means they cancel each
2711 The filter accepts the following options:
2715 Set size of segment over which cross-correlation is calculated.
2716 Default is 256. Allowed range is from 2 to 131072.
2719 Set algorithm for cross-correlation. Can be @code{slow} or @code{fast}.
2720 Default is @code{slow}. Fast algorithm assumes mean values over any given segment
2721 are always zero and thus need much less calculations to make.
2722 This is generally not true, but is valid for typical audio streams.
2725 @subsection Examples
2729 Calculate correlation between channels in stereo audio stream:
2731 ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
2737 Apply a two-pole Butterworth band-pass filter with central
2738 frequency @var{frequency}, and (3dB-point) band-width width.
2739 The @var{csg} option selects a constant skirt gain (peak gain = Q)
2740 instead of the default: constant 0dB peak gain.
2741 The filter roll off at 6dB per octave (20dB per decade).
2743 The filter accepts the following options:
2747 Set the filter's central frequency. Default is @code{3000}.
2750 Constant skirt gain if set to 1. Defaults to 0.
2753 Set method to specify band-width of filter.
2768 Specify the band-width of a filter in width_type units.
2771 How much to use filtered signal in output. Default is 1.
2772 Range is between 0 and 1.
2775 Specify which channels to filter, by default all available are filtered.
2778 Normalize biquad coefficients, by default is disabled.
2779 Enabling it will normalize magnitude response at DC to 0dB.
2782 Set transform type of IIR filter.
2791 @subsection Commands
2793 This filter supports the following commands:
2796 Change bandpass frequency.
2797 Syntax for the command is : "@var{frequency}"
2800 Change bandpass width_type.
2801 Syntax for the command is : "@var{width_type}"
2804 Change bandpass width.
2805 Syntax for the command is : "@var{width}"
2808 Change bandpass mix.
2809 Syntax for the command is : "@var{mix}"
2814 Apply a two-pole Butterworth band-reject filter with central
2815 frequency @var{frequency}, and (3dB-point) band-width @var{width}.
2816 The filter roll off at 6dB per octave (20dB per decade).
2818 The filter accepts the following options:
2822 Set the filter's central frequency. Default is @code{3000}.
2825 Set method to specify band-width of filter.
2840 Specify the band-width of a filter in width_type units.
2843 How much to use filtered signal in output. Default is 1.
2844 Range is between 0 and 1.
2847 Specify which channels to filter, by default all available are filtered.
2850 Normalize biquad coefficients, by default is disabled.
2851 Enabling it will normalize magnitude response at DC to 0dB.
2854 Set transform type of IIR filter.
2863 @subsection Commands
2865 This filter supports the following commands:
2868 Change bandreject frequency.
2869 Syntax for the command is : "@var{frequency}"
2872 Change bandreject width_type.
2873 Syntax for the command is : "@var{width_type}"
2876 Change bandreject width.
2877 Syntax for the command is : "@var{width}"
2880 Change bandreject mix.
2881 Syntax for the command is : "@var{mix}"
2884 @section bass, lowshelf
2886 Boost or cut the bass (lower) frequencies of the audio using a two-pole
2887 shelving filter with a response similar to that of a standard
2888 hi-fi's tone-controls. This is also known as shelving equalisation (EQ).
2890 The filter accepts the following options:
2894 Give the gain at 0 Hz. Its useful range is about -20
2895 (for a large cut) to +20 (for a large boost).
2896 Beware of clipping when using a positive gain.
2899 Set the filter's central frequency and so can be used
2900 to extend or reduce the frequency range to be boosted or cut.
2901 The default value is @code{100} Hz.
2904 Set method to specify band-width of filter.
2919 Determine how steep is the filter's shelf transition.
2922 How much to use filtered signal in output. Default is 1.
2923 Range is between 0 and 1.
2926 Specify which channels to filter, by default all available are filtered.
2929 Normalize biquad coefficients, by default is disabled.
2930 Enabling it will normalize magnitude response at DC to 0dB.
2933 Set transform type of IIR filter.
2942 @subsection Commands
2944 This filter supports the following commands:
2947 Change bass frequency.
2948 Syntax for the command is : "@var{frequency}"
2951 Change bass width_type.
2952 Syntax for the command is : "@var{width_type}"
2956 Syntax for the command is : "@var{width}"
2960 Syntax for the command is : "@var{gain}"
2964 Syntax for the command is : "@var{mix}"
2969 Apply a biquad IIR filter with the given coefficients.
2970 Where @var{b0}, @var{b1}, @var{b2} and @var{a0}, @var{a1}, @var{a2}
2971 are the numerator and denominator coefficients respectively.
2972 and @var{channels}, @var{c} specify which channels to filter, by default all
2973 available are filtered.
2975 @subsection Commands
2977 This filter supports the following commands:
2985 Change biquad parameter.
2986 Syntax for the command is : "@var{value}"
2989 How much to use filtered signal in output. Default is 1.
2990 Range is between 0 and 1.
2993 Specify which channels to filter, by default all available are filtered.
2996 Normalize biquad coefficients, by default is disabled.
2997 Enabling it will normalize magnitude response at DC to 0dB.
3000 Set transform type of IIR filter.
3010 Bauer stereo to binaural transformation, which improves headphone listening of
3011 stereo audio records.
3013 To enable compilation of this filter you need to configure FFmpeg with
3014 @code{--enable-libbs2b}.
3016 It accepts the following parameters:
3020 Pre-defined crossfeed level.
3024 Default level (fcut=700, feed=50).
3027 Chu Moy circuit (fcut=700, feed=60).
3030 Jan Meier circuit (fcut=650, feed=95).
3035 Cut frequency (in Hz).
3044 Remap input channels to new locations.
3046 It accepts the following parameters:
3049 Map channels from input to output. The argument is a '|'-separated list of
3050 mappings, each in the @code{@var{in_channel}-@var{out_channel}} or
3051 @var{in_channel} form. @var{in_channel} can be either the name of the input
3052 channel (e.g. FL for front left) or its index in the input channel layout.
3053 @var{out_channel} is the name of the output channel or its index in the output
3054 channel layout. If @var{out_channel} is not given then it is implicitly an
3055 index, starting with zero and increasing by one for each mapping.
3057 @item channel_layout
3058 The channel layout of the output stream.
3061 If no mapping is present, the filter will implicitly map input channels to
3062 output channels, preserving indices.
3064 @subsection Examples
3068 For example, assuming a 5.1+downmix input MOV file,
3070 ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav
3072 will create an output WAV file tagged as stereo from the downmix channels of
3076 To fix a 5.1 WAV improperly encoded in AAC's native channel order
3078 ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav
3082 @section channelsplit
3084 Split each channel from an input audio stream into a separate output stream.
3086 It accepts the following parameters:
3088 @item channel_layout
3089 The channel layout of the input stream. The default is "stereo".
3091 A channel layout describing the channels to be extracted as separate output streams
3092 or "all" to extract each input channel as a separate stream. The default is "all".
3094 Choosing channels not present in channel layout in the input will result in an error.
3097 @subsection Examples
3101 For example, assuming a stereo input MP3 file,
3103 ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
3105 will create an output Matroska file with two audio streams, one containing only
3106 the left channel and the other the right channel.
3109 Split a 5.1 WAV file into per-channel files:
3111 ffmpeg -i in.wav -filter_complex
3112 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
3113 -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
3114 front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
3119 Extract only LFE from a 5.1 WAV file:
3121 ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]'
3122 -map '[LFE]' lfe.wav
3127 Add a chorus effect to the audio.
3129 Can make a single vocal sound like a chorus, but can also be applied to instrumentation.
3131 Chorus resembles an echo effect with a short delay, but whereas with echo the delay is
3132 constant, with chorus, it is varied using using sinusoidal or triangular modulation.
3133 The modulation depth defines the range the modulated delay is played before or after
3134 the delay. Hence the delayed sound will sound slower or faster, that is the delayed
3135 sound tuned around the original one, like in a chorus where some vocals are slightly
3138 It accepts the following parameters:
3141 Set input gain. Default is 0.4.
3144 Set output gain. Default is 0.4.
3147 Set delays. A typical delay is around 40ms to 60ms.
3159 @subsection Examples
3165 chorus=0.7:0.9:55:0.4:0.25:2
3171 chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3
3175 Fuller sounding chorus with three delays:
3177 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
3182 Compress or expand the audio's dynamic range.
3184 It accepts the following parameters:
3190 A list of times in seconds for each channel over which the instantaneous level
3191 of the input signal is averaged to determine its volume. @var{attacks} refers to
3192 increase of volume and @var{decays} refers to decrease of volume. For most
3193 situations, the attack time (response to the audio getting louder) should be
3194 shorter than the decay time, because the human ear is more sensitive to sudden
3195 loud audio than sudden soft audio. A typical value for attack is 0.3 seconds and
3196 a typical value for decay is 0.8 seconds.
3197 If specified number of attacks & decays is lower than number of channels, the last
3198 set attack/decay will be used for all remaining channels.
3201 A list of points for the transfer function, specified in dB relative to the
3202 maximum possible signal amplitude. Each key points list must be defined using
3203 the following syntax: @code{x0/y0|x1/y1|x2/y2|....} or
3204 @code{x0/y0 x1/y1 x2/y2 ....}
3206 The input values must be in strictly increasing order but the transfer function
3207 does not have to be monotonically rising. The point @code{0/0} is assumed but
3208 may be overridden (by @code{0/out-dBn}). Typical values for the transfer
3209 function are @code{-70/-70|-60/-20|1/0}.
3212 Set the curve radius in dB for all joints. It defaults to 0.01.
3215 Set the additional gain in dB to be applied at all points on the transfer
3216 function. This allows for easy adjustment of the overall gain.
3220 Set an initial volume, in dB, to be assumed for each channel when filtering
3221 starts. This permits the user to supply a nominal level initially, so that, for
3222 example, a very large gain is not applied to initial signal levels before the
3223 companding has begun to operate. A typical value for audio which is initially
3224 quiet is -90 dB. It defaults to 0.
3227 Set a delay, in seconds. The input audio is analyzed immediately, but audio is
3228 delayed before being fed to the volume adjuster. Specifying a delay
3229 approximately equal to the attack/decay times allows the filter to effectively
3230 operate in predictive rather than reactive mode. It defaults to 0.
3234 @subsection Examples
3238 Make music with both quiet and loud passages suitable for listening to in a
3241 compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2
3244 Another example for audio with whisper and explosion parts:
3246 compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0
3250 A noise gate for when the noise is at a lower level than the signal:
3252 compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1
3256 Here is another noise gate, this time for when the noise is at a higher level
3257 than the signal (making it, in some ways, similar to squelch):
3259 compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1
3263 2:1 compression starting at -6dB:
3265 compand=points=-80/-80|-6/-6|0/-3.8|20/3.5
3269 2:1 compression starting at -9dB:
3271 compand=points=-80/-80|-9/-9|0/-5.3|20/2.9
3275 2:1 compression starting at -12dB:
3277 compand=points=-80/-80|-12/-12|0/-6.8|20/1.9
3281 2:1 compression starting at -18dB:
3283 compand=points=-80/-80|-18/-18|0/-9.8|20/0.7
3287 3:1 compression starting at -15dB:
3289 compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2
3295 compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6
3301 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
3305 Hard limiter at -6dB:
3307 compand=attacks=0:points=-80/-80|-6/-6|20/-6
3311 Hard limiter at -12dB:
3313 compand=attacks=0:points=-80/-80|-12/-12|20/-12
3317 Hard noise gate at -35 dB:
3319 compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20
3325 compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8
3329 @section compensationdelay
3331 Compensation Delay Line is a metric based delay to compensate differing
3332 positions of microphones or speakers.
3334 For example, you have recorded guitar with two microphones placed in
3335 different locations. Because the front of sound wave has fixed speed in
3336 normal conditions, the phasing of microphones can vary and depends on
3337 their location and interposition. The best sound mix can be achieved when
3338 these microphones are in phase (synchronized). Note that a distance of
3339 ~30 cm between microphones makes one microphone capture the signal in
3340 antiphase to the other microphone. That makes the final mix sound moody.
3341 This filter helps to solve phasing problems by adding different delays
3342 to each microphone track and make them synchronized.
3344 The best result can be reached when you take one track as base and
3345 synchronize other tracks one by one with it.
3346 Remember that synchronization/delay tolerance depends on sample rate, too.
3347 Higher sample rates will give more tolerance.
3349 The filter accepts the following parameters:
3353 Set millimeters distance. This is compensation distance for fine tuning.
3357 Set cm distance. This is compensation distance for tightening distance setup.
3361 Set meters distance. This is compensation distance for hard distance setup.
3365 Set dry amount. Amount of unprocessed (dry) signal.
3369 Set wet amount. Amount of processed (wet) signal.
3373 Set temperature in degrees Celsius. This is the temperature of the environment.
3378 Apply headphone crossfeed filter.
3380 Crossfeed is the process of blending the left and right channels of stereo
3382 It is mainly used to reduce extreme stereo separation of low frequencies.
3384 The intent is to produce more speaker like sound to the listener.
3386 The filter accepts the following options:
3390 Set strength of crossfeed. Default is 0.2. Allowed range is from 0 to 1.
3391 This sets gain of low shelf filter for side part of stereo image.
3392 Default is -6dB. Max allowed is -30db when strength is set to 1.
3395 Set soundstage wideness. Default is 0.5. Allowed range is from 0 to 1.
3396 This sets cut off frequency of low shelf filter. Default is cut off near
3397 1550 Hz. With range set to 1 cut off frequency is set to 2100 Hz.
3400 Set curve slope of low shelf filter. Default is 0.5.
3401 Allowed range is from 0.01 to 1.
3404 Set input gain. Default is 0.9.
3407 Set output gain. Default is 1.
3410 @subsection Commands
3412 This filter supports the all above options as @ref{commands}.
3414 @section crystalizer
3415 Simple algorithm to expand audio dynamic range.
3417 The filter accepts the following options:
3421 Sets the intensity of effect (default: 2.0). Must be in range between 0.0
3422 (unchanged sound) to 10.0 (maximum effect).
3425 Enable clipping. By default is enabled.
3428 @subsection Commands
3430 This filter supports the all above options as @ref{commands}.
3433 Apply a DC shift to the audio.
3435 This can be useful to remove a DC offset (caused perhaps by a hardware problem
3436 in the recording chain) from the audio. The effect of a DC offset is reduced
3437 headroom and hence volume. The @ref{astats} filter can be used to determine if
3438 a signal has a DC offset.
3442 Set the DC shift, allowed range is [-1, 1]. It indicates the amount to shift
3446 Optional. It should have a value much less than 1 (e.g. 0.05 or 0.02) and is
3447 used to prevent clipping.
3452 Apply de-essing to the audio samples.
3456 Set intensity for triggering de-essing. Allowed range is from 0 to 1.
3460 Set amount of ducking on treble part of sound. Allowed range is from 0 to 1.
3464 How much of original frequency content to keep when de-essing. Allowed range is from 0 to 1.
3468 Set the output mode.
3470 It accepts the following values:
3473 Pass input unchanged.
3476 Pass ess filtered out.
3481 Default value is @var{o}.
3487 Measure audio dynamic range.
3489 DR values of 14 and higher is found in very dynamic material. DR of 8 to 13
3490 is found in transition material. And anything less that 8 have very poor dynamics
3491 and is very compressed.
3493 The filter accepts the following options:
3497 Set window length in seconds used to split audio into segments of equal length.
3498 Default is 3 seconds.
3502 Dynamic Audio Normalizer.
3504 This filter applies a certain amount of gain to the input audio in order
3505 to bring its peak magnitude to a target level (e.g. 0 dBFS). However, in
3506 contrast to more "simple" normalization algorithms, the Dynamic Audio
3507 Normalizer *dynamically* re-adjusts the gain factor to the input audio.
3508 This allows for applying extra gain to the "quiet" sections of the audio
3509 while avoiding distortions or clipping the "loud" sections. In other words:
3510 The Dynamic Audio Normalizer will "even out" the volume of quiet and loud
3511 sections, in the sense that the volume of each section is brought to the
3512 same target level. Note, however, that the Dynamic Audio Normalizer achieves
3513 this goal *without* applying "dynamic range compressing". It will retain 100%
3514 of the dynamic range *within* each section of the audio file.
3518 Set the frame length in milliseconds. In range from 10 to 8000 milliseconds.
3519 Default is 500 milliseconds.
3520 The Dynamic Audio Normalizer processes the input audio in small chunks,
3521 referred to as frames. This is required, because a peak magnitude has no
3522 meaning for just a single sample value. Instead, we need to determine the
3523 peak magnitude for a contiguous sequence of sample values. While a "standard"
3524 normalizer would simply use the peak magnitude of the complete file, the
3525 Dynamic Audio Normalizer determines the peak magnitude individually for each
3526 frame. The length of a frame is specified in milliseconds. By default, the
3527 Dynamic Audio Normalizer uses a frame length of 500 milliseconds, which has
3528 been found to give good results with most files.
3529 Note that the exact frame length, in number of samples, will be determined
3530 automatically, based on the sampling rate of the individual input audio file.
3533 Set the Gaussian filter window size. In range from 3 to 301, must be odd
3534 number. Default is 31.
3535 Probably the most important parameter of the Dynamic Audio Normalizer is the
3536 @code{window size} of the Gaussian smoothing filter. The filter's window size
3537 is specified in frames, centered around the current frame. For the sake of
3538 simplicity, this must be an odd number. Consequently, the default value of 31
3539 takes into account the current frame, as well as the 15 preceding frames and
3540 the 15 subsequent frames. Using a larger window results in a stronger
3541 smoothing effect and thus in less gain variation, i.e. slower gain
3542 adaptation. Conversely, using a smaller window results in a weaker smoothing
3543 effect and thus in more gain variation, i.e. faster gain adaptation.
3544 In other words, the more you increase this value, the more the Dynamic Audio
3545 Normalizer will behave like a "traditional" normalization filter. On the
3546 contrary, the more you decrease this value, the more the Dynamic Audio
3547 Normalizer will behave like a dynamic range compressor.
3550 Set the target peak value. This specifies the highest permissible magnitude
3551 level for the normalized audio input. This filter will try to approach the
3552 target peak magnitude as closely as possible, but at the same time it also
3553 makes sure that the normalized signal will never exceed the peak magnitude.
3554 A frame's maximum local gain factor is imposed directly by the target peak
3555 magnitude. The default value is 0.95 and thus leaves a headroom of 5%*.
3556 It is not recommended to go above this value.
3559 Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0.
3560 The Dynamic Audio Normalizer determines the maximum possible (local) gain
3561 factor for each input frame, i.e. the maximum gain factor that does not
3562 result in clipping or distortion. The maximum gain factor is determined by
3563 the frame's highest magnitude sample. However, the Dynamic Audio Normalizer
3564 additionally bounds the frame's maximum gain factor by a predetermined
3565 (global) maximum gain factor. This is done in order to avoid excessive gain
3566 factors in "silent" or almost silent frames. By default, the maximum gain
3567 factor is 10.0, For most inputs the default value should be sufficient and
3568 it usually is not recommended to increase this value. Though, for input
3569 with an extremely low overall volume level, it may be necessary to allow even
3570 higher gain factors. Note, however, that the Dynamic Audio Normalizer does
3571 not simply apply a "hard" threshold (i.e. cut off values above the threshold).
3572 Instead, a "sigmoid" threshold function will be applied. This way, the
3573 gain factors will smoothly approach the threshold value, but never exceed that
3577 Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled.
3578 By default, the Dynamic Audio Normalizer performs "peak" normalization.
3579 This means that the maximum local gain factor for each frame is defined
3580 (only) by the frame's highest magnitude sample. This way, the samples can
3581 be amplified as much as possible without exceeding the maximum signal
3582 level, i.e. without clipping. Optionally, however, the Dynamic Audio
3583 Normalizer can also take into account the frame's root mean square,
3584 abbreviated RMS. In electrical engineering, the RMS is commonly used to
3585 determine the power of a time-varying signal. It is therefore considered
3586 that the RMS is a better approximation of the "perceived loudness" than
3587 just looking at the signal's peak magnitude. Consequently, by adjusting all
3588 frames to a constant RMS value, a uniform "perceived loudness" can be
3589 established. If a target RMS value has been specified, a frame's local gain
3590 factor is defined as the factor that would result in exactly that RMS value.
3591 Note, however, that the maximum local gain factor is still restricted by the
3592 frame's highest magnitude sample, in order to prevent clipping.
3595 Enable channels coupling. By default is enabled.
3596 By default, the Dynamic Audio Normalizer will amplify all channels by the same
3597 amount. This means the same gain factor will be applied to all channels, i.e.
3598 the maximum possible gain factor is determined by the "loudest" channel.
3599 However, in some recordings, it may happen that the volume of the different
3600 channels is uneven, e.g. one channel may be "quieter" than the other one(s).
3601 In this case, this option can be used to disable the channel coupling. This way,
3602 the gain factor will be determined independently for each channel, depending
3603 only on the individual channel's highest magnitude sample. This allows for
3604 harmonizing the volume of the different channels.
3607 Enable DC bias correction. By default is disabled.
3608 An audio signal (in the time domain) is a sequence of sample values.
3609 In the Dynamic Audio Normalizer these sample values are represented in the
3610 -1.0 to 1.0 range, regardless of the original input format. Normally, the
3611 audio signal, or "waveform", should be centered around the zero point.
3612 That means if we calculate the mean value of all samples in a file, or in a
3613 single frame, then the result should be 0.0 or at least very close to that
3614 value. If, however, there is a significant deviation of the mean value from
3615 0.0, in either positive or negative direction, this is referred to as a
3616 DC bias or DC offset. Since a DC bias is clearly undesirable, the Dynamic
3617 Audio Normalizer provides optional DC bias correction.
3618 With DC bias correction enabled, the Dynamic Audio Normalizer will determine
3619 the mean value, or "DC correction" offset, of each input frame and subtract
3620 that value from all of the frame's sample values which ensures those samples
3621 are centered around 0.0 again. Also, in order to avoid "gaps" at the frame
3622 boundaries, the DC correction offset values will be interpolated smoothly
3623 between neighbouring frames.
3625 @item altboundary, b
3626 Enable alternative boundary mode. By default is disabled.
3627 The Dynamic Audio Normalizer takes into account a certain neighbourhood
3628 around each frame. This includes the preceding frames as well as the
3629 subsequent frames. However, for the "boundary" frames, located at the very
3630 beginning and at the very end of the audio file, not all neighbouring
3631 frames are available. In particular, for the first few frames in the audio
3632 file, the preceding frames are not known. And, similarly, for the last few
3633 frames in the audio file, the subsequent frames are not known. Thus, the
3634 question arises which gain factors should be assumed for the missing frames
3635 in the "boundary" region. The Dynamic Audio Normalizer implements two modes
3636 to deal with this situation. The default boundary mode assumes a gain factor
3637 of exactly 1.0 for the missing frames, resulting in a smooth "fade in" and
3638 "fade out" at the beginning and at the end of the input, respectively.
3641 Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
3642 By default, the Dynamic Audio Normalizer does not apply "traditional"
3643 compression. This means that signal peaks will not be pruned and thus the
3644 full dynamic range will be retained within each local neighbourhood. However,
3645 in some cases it may be desirable to combine the Dynamic Audio Normalizer's
3646 normalization algorithm with a more "traditional" compression.
3647 For this purpose, the Dynamic Audio Normalizer provides an optional compression
3648 (thresholding) function. If (and only if) the compression feature is enabled,
3649 all input frames will be processed by a soft knee thresholding function prior
3650 to the actual normalization process. Put simply, the thresholding function is
3651 going to prune all samples whose magnitude exceeds a certain threshold value.
3652 However, the Dynamic Audio Normalizer does not simply apply a fixed threshold
3653 value. Instead, the threshold value will be adjusted for each individual
3655 In general, smaller parameters result in stronger compression, and vice versa.
3656 Values below 3.0 are not recommended, because audible distortion may appear.
3659 Set the target threshold value. This specifies the lowest permissible
3660 magnitude level for the audio input which will be normalized.
3661 If input frame volume is above this value frame will be normalized.
3662 Otherwise frame may not be normalized at all. The default value is set
3663 to 0, which means all input frames will be normalized.
3664 This option is mostly useful if digital noise is not wanted to be amplified.
3667 @subsection Commands
3669 This filter supports the all above options as @ref{commands}.
3673 Make audio easier to listen to on headphones.
3675 This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio
3676 so that when listened to on headphones the stereo image is moved from
3677 inside your head (standard for headphones) to outside and in front of
3678 the listener (standard for speakers).
3684 Apply a two-pole peaking equalisation (EQ) filter. With this
3685 filter, the signal-level at and around a selected frequency can
3686 be increased or decreased, whilst (unlike bandpass and bandreject
3687 filters) that at all other frequencies is unchanged.
3689 In order to produce complex equalisation curves, this filter can
3690 be given several times, each with a different central frequency.
3692 The filter accepts the following options:
3696 Set the filter's central frequency in Hz.
3699 Set method to specify band-width of filter.
3714 Specify the band-width of a filter in width_type units.
3717 Set the required gain or attenuation in dB.
3718 Beware of clipping when using a positive gain.
3721 How much to use filtered signal in output. Default is 1.
3722 Range is between 0 and 1.
3725 Specify which channels to filter, by default all available are filtered.
3728 Normalize biquad coefficients, by default is disabled.
3729 Enabling it will normalize magnitude response at DC to 0dB.
3732 Set transform type of IIR filter.
3741 @subsection Examples
3744 Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz:
3746 equalizer=f=1000:t=h:width=200:g=-10
3750 Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz with Q 2:
3752 equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5
3756 @subsection Commands
3758 This filter supports the following commands:
3761 Change equalizer frequency.
3762 Syntax for the command is : "@var{frequency}"
3765 Change equalizer width_type.
3766 Syntax for the command is : "@var{width_type}"
3769 Change equalizer width.
3770 Syntax for the command is : "@var{width}"
3773 Change equalizer gain.
3774 Syntax for the command is : "@var{gain}"
3777 Change equalizer mix.
3778 Syntax for the command is : "@var{mix}"
3781 @section extrastereo
3783 Linearly increases the difference between left and right channels which
3784 adds some sort of "live" effect to playback.
3786 The filter accepts the following options:
3790 Sets the difference coefficient (default: 2.5). 0.0 means mono sound
3791 (average of both channels), with 1.0 sound will be unchanged, with
3792 -1.0 left and right channels will be swapped.
3795 Enable clipping. By default is enabled.
3798 @subsection Commands
3800 This filter supports the all above options as @ref{commands}.
3802 @section firequalizer
3803 Apply FIR Equalization using arbitrary frequency response.
3805 The filter accepts the following option:
3809 Set gain curve equation (in dB). The expression can contain variables:
3812 the evaluated frequency
3816 channel number, set to 0 when multichannels evaluation is disabled
3818 channel id, see libavutil/channel_layout.h, set to the first channel id when
3819 multichannels evaluation is disabled
3823 channel_layout, see libavutil/channel_layout.h
3828 @item gain_interpolate(f)
3829 interpolate gain on frequency f based on gain_entry
3830 @item cubic_interpolate(f)
3831 same as gain_interpolate, but smoother
3833 This option is also available as command. Default is @code{gain_interpolate(f)}.
3836 Set gain entry for gain_interpolate function. The expression can
3840 store gain entry at frequency f with value g
3842 This option is also available as command.
3845 Set filter delay in seconds. Higher value means more accurate.
3846 Default is @code{0.01}.
3849 Set filter accuracy in Hz. Lower value means more accurate.
3850 Default is @code{5}.
3853 Set window function. Acceptable values are:
3856 rectangular window, useful when gain curve is already smooth
3858 hann window (default)
3864 3-terms continuous 1st derivative nuttall window
3866 minimum 3-terms discontinuous nuttall window
3868 4-terms continuous 1st derivative nuttall window
3870 minimum 4-terms discontinuous nuttall (blackman-nuttall) window
3872 blackman-harris window
3878 If enabled, use fixed number of audio samples. This improves speed when
3879 filtering with large delay. Default is disabled.
3882 Enable multichannels evaluation on gain. Default is disabled.
3885 Enable zero phase mode by subtracting timestamp to compensate delay.
3886 Default is disabled.
3889 Set scale used by gain. Acceptable values are:
3892 linear frequency, linear gain
3894 linear frequency, logarithmic (in dB) gain (default)
3896 logarithmic (in octave scale where 20 Hz is 0) frequency, linear gain
3898 logarithmic frequency, logarithmic gain
3902 Set file for dumping, suitable for gnuplot.
3905 Set scale for dumpfile. Acceptable values are same with scale option.
3909 Enable 2-channel convolution using complex FFT. This improves speed significantly.
3910 Default is disabled.
3913 Enable minimum phase impulse response. Default is disabled.
3916 @subsection Examples
3921 firequalizer=gain='if(lt(f,1000), 0, -INF)'
3924 lowpass at 1000 Hz with gain_entry:
3926 firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)'
3929 custom equalization:
3931 firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)'
3934 higher delay with zero phase to compensate delay:
3936 firequalizer=delay=0.1:fixed=on:zero_phase=on
3939 lowpass on left channel, highpass on right channel:
3941 firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))'
3942 :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on
3947 Apply a flanging effect to the audio.
3949 The filter accepts the following options:
3953 Set base delay in milliseconds. Range from 0 to 30. Default value is 0.
3956 Set added sweep delay in milliseconds. Range from 0 to 10. Default value is 2.
3959 Set percentage regeneration (delayed signal feedback). Range from -95 to 95.
3963 Set percentage of delayed signal mixed with original. Range from 0 to 100.
3964 Default value is 71.
3967 Set sweeps per second (Hz). Range from 0.1 to 10. Default value is 0.5.
3970 Set swept wave shape, can be @var{triangular} or @var{sinusoidal}.
3971 Default value is @var{sinusoidal}.
3974 Set swept wave percentage-shift for multi channel. Range from 0 to 100.
3975 Default value is 25.
3978 Set delay-line interpolation, @var{linear} or @var{quadratic}.
3979 Default is @var{linear}.
3983 Apply Haas effect to audio.
3985 Note that this makes most sense to apply on mono signals.
3986 With this filter applied to mono signals it give some directionality and
3987 stretches its stereo image.
3989 The filter accepts the following options:
3993 Set input level. By default is @var{1}, or 0dB
3996 Set output level. By default is @var{1}, or 0dB.
3999 Set gain applied to side part of signal. By default is @var{1}.
4002 Set kind of middle source. Can be one of the following:
4012 Pick middle part signal of stereo image.
4015 Pick side part signal of stereo image.
4019 Change middle phase. By default is disabled.
4022 Set left channel delay. By default is @var{2.05} milliseconds.
4025 Set left channel balance. By default is @var{-1}.
4028 Set left channel gain. By default is @var{1}.
4031 Change left phase. By default is disabled.
4034 Set right channel delay. By defaults is @var{2.12} milliseconds.
4037 Set right channel balance. By default is @var{1}.
4040 Set right channel gain. By default is @var{1}.
4043 Change right phase. By default is enabled.
4048 Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM stream with
4049 embedded HDCD codes is expanded into a 20-bit PCM stream.
4051 The filter supports the Peak Extend and Low-level Gain Adjustment features
4052 of HDCD, and detects the Transient Filter flag.
4055 ffmpeg -i HDCD16.flac -af hdcd OUT24.flac
4058 When using the filter with wav, note the default encoding for wav is 16-bit,
4059 so the resulting 20-bit stream will be truncated back to 16-bit. Use something
4060 like @command{-acodec pcm_s24le} after the filter to get 24-bit PCM output.
4062 ffmpeg -i HDCD16.wav -af hdcd OUT16.wav
4063 ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav
4066 The filter accepts the following options:
4069 @item disable_autoconvert
4070 Disable any automatic format conversion or resampling in the filter graph.
4072 @item process_stereo
4073 Process the stereo channels together. If target_gain does not match between
4074 channels, consider it invalid and use the last valid target_gain.
4077 Set the code detect timer period in ms.
4080 Always extend peaks above -3dBFS even if PE isn't signaled.
4083 Replace audio with a solid tone and adjust the amplitude to signal some
4084 specific aspect of the decoding process. The output file can be loaded in
4085 an audio editor alongside the original to aid analysis.
4087 @code{analyze_mode=pe:force_pe=true} can be used to see all samples above the PE level.
4094 Gain adjustment level at each sample
4096 Samples where peak extend occurs
4098 Samples where the code detect timer is active
4100 Samples where the target gain does not match between channels
4106 Apply head-related transfer functions (HRTFs) to create virtual
4107 loudspeakers around the user for binaural listening via headphones.
4108 The HRIRs are provided via additional streams, for each channel
4109 one stereo input stream is needed.
4111 The filter accepts the following options:
4115 Set mapping of input streams for convolution.
4116 The argument is a '|'-separated list of channel names in order as they
4117 are given as additional stream inputs for filter.
4118 This also specify number of input streams. Number of input streams
4119 must be not less than number of channels in first stream plus one.
4122 Set gain applied to audio. Value is in dB. Default is 0.
4125 Set processing type. Can be @var{time} or @var{freq}. @var{time} is
4126 processing audio in time domain which is slow.
4127 @var{freq} is processing audio in frequency domain which is fast.
4128 Default is @var{freq}.
4131 Set custom gain for LFE channels. Value is in dB. Default is 0.
4134 Set size of frame in number of samples which will be processed at once.
4135 Default value is @var{1024}. Allowed range is from 1024 to 96000.
4138 Set format of hrir stream.
4139 Default value is @var{stereo}. Alternative value is @var{multich}.
4140 If value is set to @var{stereo}, number of additional streams should
4141 be greater or equal to number of input channels in first input stream.
4142 Also each additional stream should have stereo number of channels.
4143 If value is set to @var{multich}, number of additional streams should
4144 be exactly one. Also number of input channels of additional stream
4145 should be equal or greater than twice number of channels of first input
4149 @subsection Examples
4153 Full example using wav files as coefficients with amovie filters for 7.1 downmix,
4154 each amovie filter use stereo file with IR coefficients as input.
4155 The files give coefficients for each position of virtual loudspeaker:
4158 -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"
4163 Full example using wav files as coefficients with amovie filters for 7.1 downmix,
4164 but now in @var{multich} @var{hrir} format.
4166 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"
4173 Apply a high-pass filter with 3dB point frequency.
4174 The filter can be either single-pole, or double-pole (the default).
4175 The filter roll off at 6dB per pole per octave (20dB per pole per decade).
4177 The filter accepts the following options:
4181 Set frequency in Hz. Default is 3000.
4184 Set number of poles. Default is 2.
4187 Set method to specify band-width of filter.