2017-03-09 99 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.)