2017-03-09 351 views
0

是否可以使用ffmpeg在视频文件中添加多个暂停?例如:我想从第5秒开始暂停3秒,然后从第17秒开始暂停8秒。音频文件同步不是问题,只是暂停应该在指定的时间间隔。 谢谢。FFMPEG-在视频中添加暂停

+0

看到我的【答案】(https://superuser.com/q/1071369/114058)这里基本方法。 – Mulvya

回答

0

如果我以前的答复不工作,你可能需要削减了源视频,然后在其上重合空白画布。使用-filter_complex参数传递您构造的过滤器图。

https://ffmpeg.org/ffmpeg-filters.html

the 'color' filter will give you a blank canvas with a 5 second duration 
the 'trim' filter will allow you to get a stream containing only the first 3 seconds 
the 'overlay' filter will allow you to overlay the first 3 seconds of footage onto the blank canvas repeating the last frame 

这将会给你的第一个场景

the 'concat' filter will allow you to join the scenes together 

you can also use 'select' (see ffmpeg timeline editing) 
to exclude the first 3 seconds of the source video for the second scene. 
(You may need to import the same source video file twice 
so you can reference it as [0:v] to make the first scene 
and [1:v] to make the second scene in the filtergraph if you run into problems.)