ffmpeg:如何重复音频“水印" [英] ffmpeg: How to repeat an audio "watermark"

查看:19
本文介绍了ffmpeg:如何重复音频“水印"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于 FFMpeg 的问题.我想每隔一次注入"一个 mp3(哔声)文件,例如5 秒到另一个 mp3 文件.你们中的任何人都可以为我提供一些有关如何执行此操作的指导.

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.

非常感谢!

推荐答案

#1 处理哔声,使其持续 5 秒:

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

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

#2 与其他音频混合

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 使输入无限循环.资产是使循环的时间戳连续.

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

这篇关于ffmpeg:如何重复音频“水印"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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