使用ffmpeg在一个音频文件中进行多次淡入/淡出效果 [英] Multiple fadeIn/fadeOut effects in one audio file with ffmpeg

查看:875
本文介绍了使用ffmpeg在一个音频文件中进行多次淡入/淡出效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些问题可以为一个音频文件添加几个淡入淡出效果。当我尝试使用这样的命令:

I have some problem to add several fade effects to one audio file. When I try to use a command like this:

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

那么我的输出音频文件只有一个 fadein fadeout 只应用一次。所有下一个效果都不会被应用。有什么可能的方法来应用几个褪色效果到同一个音频文件?此外,此命令中 ss st 参数之间的区别是什么?

then my output audio file has a fadein and fadeout applied only once. All the next effects don't get applied. Is there any possible way to apply several fade effects to the same audio file? Also, what is the difference between ss and st parameter in this command?

推荐答案

为ffmpeg工作2.5.2。

Works for me with ffmpeg 2.5.2.

我正在使用淡入淡出音频过滤器,持续3秒。

I'm using fade in and fade out audio filter, both for the duration of 3 seconds.

ffmpeg -i audio.mp3 -af 'afade=t=in:ss=0:d=3,afade=t=out:st=27:d=3' out.mp3

我建议升级您的ffmpeg,因为这可能是一个错误。更多信息在文档

I'd recommend to upgrade your ffmpeg, as this might be a bug. More information in the docs.

这篇关于使用ffmpeg在一个音频文件中进行多次淡入/淡出效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆