添加音频(带偏移)与FFMPEG视频 [英] Add audio (with an offset) to video with FFMPEG

查看:1551
本文介绍了添加音频(带偏移)与FFMPEG视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有10分钟的视频,并有50分钟的音频MP3。
在视频开始在500秒进音频。
使用FFMPEG,我怎么可以添加音频到视频,但指定的 500秒的声抵消(让他们同步上涨)?

I have a 10 minute video and a 50 minute audio mp3. The video starts at 500 seconds into the audio. Using FFMPEG, how can I add the the audio to the video but specify a 500 seconds audio offset (So that they sync up)?

::::

沿着这页面它表明如何指定偏移量。

Down the bottom of this page it suggests how to specify an offset.

$的ffmpeg -i VIDEO_SOURCE -itsoffet延迟-i audio_source -map 0:X -map 1:Y ......

$ ffmpeg -i video_source -itsoffet delay -i audio_source -map 0:x -map 1:y ......

然而,当我应用此,它仍然开始从一开始的声音。

However, when I apply this, it still starts the audio from the start.

感谢

推荐答案

我不能让音频正常或者对冲,以及一些搜索建议 -itsoffset 目前

I couldn't get audio to offset properly either, and some searching suggests that -itsoffset is currently broken.

您可以尝试并获得/编译旧版本的ffmpeg它打破了之前(这听起来并不像很多的乐趣)。

You could try and get/compile an old version of ffmpeg before it broke (which doesn't sound like much fun).

另外,还可以使用类似然后再结合必要的宁静垫音频:

Alternately, you could pad your audio with the necessary silence using something like sox and then combine:

sox -null silence.mp3 trim 0 500    # use -r to adjust sample-rate if necessary
sox silence.mp3 input.mp3 padded_input.mp3
ffmpeg -i in.avi -i padded_input.mp3 out.avi

这篇关于添加音频(带偏移)与FFMPEG视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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