Vertically or horizontally stack (mosaic) several videos using ffmpeg?

后端 未结 3 1798
野性不改
野性不改 2020-11-22 13:00

I have two videos of the same exact length, and I would like to use ffmpeg to stack them into one video file.

How can I do this?

3条回答
  •  悲哀的现实
    2020-11-22 13:32

    For 2 videos:

    ffmpeg -i 1.mp4 -i 2.mp4 -filter_complex hstack out.mp4
    

    For more videos(3 in this example):

    ffmpeg -i 1.mp4 -i 2.mp4 -i 3.mp4 -filter_complex hstack=3 out.mp4
    

提交回复
热议问题