Multiple video sources combined into one

五迷三道 提交于 2019-11-30 01:32:36

Do everything inside ffmpeg. You can do a lot of things with video filters. For example to join two videos side by side:

ffmpeg -i input0.avi -vf "movie=input1.avi [in1]; [in]pad=640*2:352[in0]; [in0][in1] overlay=640:0 [out]" out.avi

@Oded: That's basically what this command does. You can remove the pad filter and change the parameters of overlay filter to move the second video wherever you like.

ffmpeg -i big.avi -vf "movie=small.avi [small]; [in][small] overlay=10:10 [out]" out.avi

The link I provided describes the filter syntax. You can chain multiple filters together:

ffmpeg -i big.avi -vf "movie=small0.avi [small0]; [in][small0] overlay=10:10 [tmp];\
                       movie=small1.avi [small1]; [tmp][small1] overlay=30:10 [out]" out.avi
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!