2016-12-09 82 views
0

使用以下命令:ffmpeg - 多次寫入相同的幀?

ffmpeg -i test.mp4 -vf "select='not(mod(n,2000))',setpts=N/3/TB" -r 3 output.gif 

我寫1幀,每2000,在3FPS GIF文件。

但是,當我看到FFmpeg的輸出也有一些是令人困惑:

speed=0.00997frame= 1 fps=0.7 q=-0.0 size=  1kB time=00:00:00.01 
speed=0.00498frame= 1 fps=0.4 q=-0.0 size=  1kB time=00:00:00.01 
speed=0.00332frame= 2 fps=0.6 q=-0.0 size=  2kB time=00:00:00.34 
speed=0.0847xframe= 2 fps=0.4 q=-0.0 size=  2kB time=00:00:00.34 
speed=0.0678xframe= 2 fps=0.4 q=-0.0 size=  2kB time=00:00:00.34 
speed=0.0565xframe= 2 fps=0.3 q=-0.0 size=  2kB time=00:00:00.34 
speed=0.0968xframe= 3 fps=0.4 q=-0.0 size=  20kB time=00:00:00.68 
speed=0.0847xframe= 3 fps=0.4 q=-0.0 size=  20kB time=00:00:00.68 
speed=0.0753xframe= 3 fps=0.3 q=-0.0 size=  20kB time=00:00:00.68 
speed=0.0678xframe= 4 fps=0.4 q=-0.0 size=  41kB time=00:00:01.01 
speed=0.0915xframe= 4 fps=0.3 q=-0.0 size=  41kB time=00:00:01.01 
speed=0.0839xframe= 4 fps=0.3 q=-0.0 size=  41kB time=00:00:01.01 
speed=0.0774xframe= 4 fps=0.3 q=-0.0 size=  41kB time=00:00:01.01 
speed=0.0954xframe= 5 fps=0.3 q=-0.0 size=  66kB time=00:00:01.34 
speed=0.089x frame= 5 fps=0.3 q=-0.0 size=  66kB time=00:00:01.34 
speed=0.0834xframe= 5 fps=0.3 q=-0.0 size=  66kB time=00:00:01.34 
speed=0.0785xframe= 6 fps=0.3 q=-0.0 size=  90kB time=00:00:01.68 
speed=0.093x frame= 6 fps=0.3 q=-0.0 size=  90kB time=00:00:01.68 
speed=0.0881xframe= 6 fps=0.3 q=-0.0 size=  90kB time=00:00:01.68 
speed=0.0837xframe= 6 fps=0.3 q=-0.0 size=  90kB time=00:00:01.68 

它看起來像每個被重建多次,目標幀。 我希望是這樣的:

speed=0.00997frame= 1 fps=0.7 q=-0.0 size=  1kB time=00:00:00.01 
speed=0.00332frame= 2 fps=0.6 q=-0.0 size=  2kB time=00:00:00.34 
speed=0.0968xframe= 3 fps=0.4 q=-0.0 size=  20kB time=00:00:00.68 
speed=0.0678xframe= 4 fps=0.4 q=-0.0 size=  41kB time=00:00:01.01 
speed=0.0954xframe= 5 fps=0.3 q=-0.0 size=  66kB time=00:00:01.34 
speed=0.0785xframe= 6 fps=0.3 q=-0.0 size=  90kB time=00:00:01.68 

我缺少的東西?

(這是從一個ffmpeg - multiple output with thumbnails隨訪)

回答

0

這只是進度報告。每次刷新報告時,如果新幀尚未編碼,它將顯示相同的數字。 fps速度爲1.0意味着每幀編碼1幀。所以,如果一秒鐘內進度報告有兩次刷新,第二個將顯示相同的幀數。

+0

好的,我明白了;所以它不會處理多個源幀來更新目標幀。謝謝! – Thomas