Apply fade-in/out effect to input audio.
The filter accepts parameters as a list of key=value pairs, separated by ":".
A description of the accepted parameters follows.
- type, t
-
Specify the effect type, can be either
in
for fade-in, orout
for a fade-out effect. Default isin
. - start_sample, ss
-
Specify the number of the start sample for starting to apply the fade effect. Default is 0.
- nb_samples, ns
-
Specify the number of samples for which the fade effect has to last. At the end of the fade-in effect the output audio will have the same volume as the input audio, at the end of the fade-out transition the output audio will be silence. Default is 44100.
- start_time, st
-
Specify time in seconds for starting to apply the fade effect. Default is 0. If set this option is used instead of start_sample one.
- duration, d
-
Specify the number of seconds for which the fade effect has to last. At the end of the fade-in effect the output audio will have the same volume as the input audio, at the end of the fade-out transition the output audio will be silence. Default is 0. If set this option is used instead of nb_samples one.
- curve
-
Set curve for fade transition.
It accepts the following values:
- tri
-
select triangular, linear slope (default)
- qsin
-
select quarter of sine wave
- hsin
-
select half of sine wave
- esin
-
select exponential sine wave
- log
-
select logarithmic
- par
-
select inverted parabola
- qua
-
select quadratic
- cub
-
select cubic
- squ
-
select square root
- cbr
-
select cubic root
Examples
-
Fade in first 15 seconds of audio:
afade=t=in:ss=0:d=15
-
Fade out last 25 seconds of a 900 seconds audio:
afade=t=out:ss=875:d=25