FFMPEG“缓冲队列溢出,丢弃”做两个叠加的Concat

时间:2016-12-10 23:49:34

标签: ffmpeg overlay concat

Ffmpeg生成错误"缓冲区队列溢出,丢弃" (并且结果不好)当我尝试Concat两个叠加时。

像这样:

ffmpeg -y -f lavfi -i "color=black@0:s=1920x1080:r=25" -i "D:\Dev\FormaVeo\Chutier\bunny.mp4" -i "D:\Dev\FormaVeo\Chutier\bunny2.mp4" -filter_complex "[0][1:v]overlay=shortest=1,fifo[A];[0][2:v]overlay=shortest=1,fifo[B];[A][B]concat=n=2:v=1:a=0[v]" -map "[v]" "D:\Dev\FormaVeo\FormaVeoExport/montage_laurent3/video.mp4"

有人明白吗?

由于

信息:此命令被简化为仅显示问题(感知不是此处的主题)

1 个答案:

答案 0 :(得分:1)

使用此:

ffmpeg -y -f lavfi -i "color=black@0:s=1280x720:r=30,format=yuva420p"
       -i "in1.mp4" -i "in2.mp4" -filter_complex
      "[0]fifo[a];
       [1:v]trim=start=0:duration=64.6,setpts=PTS-STARTPTS,scale=1280x720[video0];
       [2:v]trim=start=1.254328:duration=8.155469,setpts=PTS-STARTPTS,scale=1280x720[video1];
       [0][video0]overlay=x=0:y=0:shortest=1[pisteVideo0_video0];
       [a][video1]overlay=x=0:y=0:shortest=1[pisteVideo0_video1];
       [pisteVideo0_video0][pisteVideo0_video1]concat=n=2:v=1:a=0[v]" -map "[v]" "result.mp4"

(我已经在ffmpeg论坛上调整了你的命令)

它是导致帧丢失的基本流(颜色),因为它很晚才被第二个覆盖请求。插入FIFO过滤器以避免这种情况。

相关问题