gpt4 book ai didi

audio - 使用 ffmpeg 在一个音频文件中添加多个淡入/淡出效果

转载 作者:行者123 更新时间:2023-12-04 03:01:02 33 4
gpt4 key购买 nike

我在向一个音频文件添加几个淡入淡出效果时遇到了一些问题。当我尝试使用这样的命令时:

ffmpeg -y -i /home/user/video/test/sound.mp3 -af "afade=t=in:ss=0:d=3,afade=t=out:st=7:d=3,afade=t=in:st=10:d=3,afade=t=out:st=17:d=3,afade=t=in:st=20:d=3,afade=t=out:st=27:d=3" /tmp/test.mp3

然后我的输出音频文件只应用了一次淡入和淡出。不会应用所有下一个效果。有没有办法将多个淡入淡出效果应用到同一个音频文件?另外,这个命令中的 ss 和 st 参数有什么区别?

最佳答案

问题是,在淡出音频后,您正试图淡出静音。

解决方案是在您想要开始淡入时禁用淡出过滤器。

你可以通过 Timeline Editing 来实现。启用过滤器一段特定的时间。

下面的例子工作得很好:

ffmpeg -i input.mp3 -af "afade=enable='between(t,0,3)':t=in:ss=0:d=3,afade=enable='between(t,7,10)':t=out:st=7:d=3,afade=enable='between(t,10,13)':t=in:st=10:d=3,afade=enable='between(t,13,16)':t=out:st=13:d=3" -t 16 output.mp3

关于audio - 使用 ffmpeg 在一个音频文件中添加多个淡入/淡出效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23218906/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com