Multiple fadeIn/fadeOut effects in one audio file with ffmpeg

后端 未结 3 1730
逝去的感伤
逝去的感伤 2021-02-06 00:02

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 \"afad         


        
3条回答
  •  独厮守ぢ
    2021-02-06 00:51

    The problem is that after fading out the audio you are trying to fade in the silence.

    The solution is to disable the fade out filter when you want to start fading in.

    You can achieve that with Timeline Editing to enable the filters for a particular amount of time.

    The following example works just fine:

    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
    

提交回复
热议问题