Apply fade-in/out effect to input audio.
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 for starting to apply the fade effect. Default is 0. The accepted syntax is:
[-]HH[:MM[:SS[.m...]]] [-]S+[.m...]
See also the function
av_parse_time()
. If set this option is used instead of start_sample one. - duration, d
-
Specify the duration for which the fade effect has to last. Default is 0. The accepted syntax is:
[-]HH[:MM[:SS[.m...]]] [-]S+[.m...]
See also the function
av_parse_time()
. 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. 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:st=875:d=25