ffmpeg中不同的fadein / fadeout曲线有什么区别?

时间:2018-01-19 15:51:02

标签: audio ffmpeg audacity

以下是此处afade

acrossfadetri 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 ipar select inverted parabola qua select quadratic cub select cubic squ select square root cbr select cubic root par select parabola exp select exponential iqsin select inverted quarter of sine wave ihsin select inverted half of sine wave dese select double-exponential seat desi select double-exponential sigmoid 过滤器的可能曲线列表
libavfilter/af_afade.c

以下是switch (curve) { case QSIN: gain = sin(gain * M_PI / 2.0); break; case IQSIN: /* 0.6... = 2 / M_PI */ gain = 0.6366197723675814 * asin(gain); break; case ESIN: gain = 1.0 - cos(M_PI / 4.0 * (CUBE(2.0*gain - 1) + 1)); break; case HSIN: gain = (1.0 - cos(gain * M_PI)) / 2.0; break; case IHSIN: /* 0.3... = 1 / M_PI */ gain = 0.3183098861837907 * acos(1 - 2 * gain); break; case EXP: /* -11.5... = 5*ln(0.1) */ gain = exp(-11.512925464970227 * (1 - gain)); break; case LOG: gain = av_clipd(1 + 0.2 * log10(gain), 0, 1.0); break; case PAR: gain = 1 - sqrt(1 - gain); break; case IPAR: gain = (1 - (1 - gain) * (1 - gain)); break; case QUA: gain *= gain; break; case CUB: gain = CUBE(gain); break; case SQU: gain = sqrt(gain); break; case CBR: gain = cbrt(gain); break; case DESE: gain = gain <= 0.5 ? cbrt(2 * gain) / 2: 1 - cbrt(2 * (1 - gain)) / 2; break; case DESI: gain = gain <= 0.5 ? CUBE(2 * gain) / 2: 1 - CUBE(2 * (1 - gain)) / 2; break; } 的代码:

C:\Folder> bash
User@Computer:/mnt/c/Folder$ g++ hello_world.cpp -o hello_world
User@Computer:/mnt/c/Folder$ ./hello_world

它们看起来如何?他们听起来怎么样?哪一个推荐用于fadein + fadeout和crossfade?就个人而言,我只是想避免音频点击,也许交叉淡化在这里有点过分。

相关链接:https://ffmpeg.org/ffmpeg-filters.html#afade-1。不知道大胆的名字如何转化为ffmpeg名称。

1 个答案:

答案 0 :(得分:1)

您可以在此处找到所有不同淡入曲线的图:

https://trac.ffmpeg.org/wiki/AfadeCurves