Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Audio Auto Fade Out

New Here ,
Jul 06, 2023 Jul 06, 2023


将音频文件导入After Effects,将其添加到你的合成中。
选中音频图层,在时间线中展开“音频”属性,然后展开“波形”属性。
按住Alt/Option键,单击音量属性旁边的停止表达式按钮。这将允许你在音量属性上输入表达式。
在表达式编辑器中输入以下代码:
scss
Copy code
audioDuration = thisLayer.source.duration; // 获取音频图层的总时长
fadeDuration = 1; // 设置淡出时间(1秒)
currentTime = time; // 获取当前时间
startFade = audioDuration - fadeDuration; // 计算淡出开始的时间点

if (currentTime <= startFade) {
value;
} else {
linear(currentTime, startFade, audioDuration, value, 0);
}
这个表达式将检查当前时间是否在淡出开始时间之前。如果是,则音量保持不变。如果当前时间超过淡出开始时间,则音量将在最后1秒内线性减小,直到音频消失。

输入完表达式后,按Enter键确认。现在,当你播放合成时,音频将在最后1秒内逐渐消失。

TOPICS
Audio
132
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 06, 2023 Jul 06, 2023
LATEST

This expression does not work in layers

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines