ffmpeg: How to repeat an audio “watermark”

2020-03-06 03:11发布

I have a question concerning FFMpeg. I would like to "inject" a mp3 (beep) file once every e.g. 5 sec into an other mp3 file. Can any of you provide me with some guidance on how to do this.

Many thanks in advance!

标签: ffmpeg
1条回答
啃猪蹄的小仙女
2楼-- · 2020-03-06 03:38

#1 Process the beep to make it 5 seconds long:

ffmpeg -i beep.mp3 -af apad -t 5 beep.wav

#2 Mix with the other audio

ffmpeg -i main.mp3 -filter_complex "amovie=beep.wav:loop=0,asetpts=N/SR/TB[beep];
                                    [0][beep]amix=duration=shortest,volume=2"   out.mp3

loop=0 makes the input loop indefinitely. The asetpts is to make the timestamps of the loop continuous.

查看更多
登录 后发表回答