FFMPEG 2 Videos transcoded and side by side in 1 frame?

前端 未结 1 1380
忘了有多久
忘了有多久 2020-12-13 04:24

I have 2 videos: HEADSHOT.MOV and SCREEN.MOV. They are both large files and I am looking to both shrink (size, bitrate, etc) and place these two side by side in the same, v

相关标签:
1条回答
  • 2020-12-13 05:18

    The result can be achieved with the combination of scale, pad and overlay filters as the following:

    ffmpeg.exe -i LeftInput.mp4 -vf "[in] scale=iw/2:ih/2, pad=2*iw:ih [left]; 
        movie=RightInput.mp4, scale=iw/3:ih/3, fade=out:300:30:alpha=1 [right]; 
        [left][right] overlay=main_w/2:0 [out]" -b:v 768k Output.mp4
    

    Here the first video is shrunk by half, and padded to its original size. The second video is shrunk by two thirds and overlayed on the right half (padding area) of the first one.

    The shorter video can be faded out; otherwise, it last frame will be display till the end of the combined video.

    The result bit rate can be set with -b:v option. Also, video sizes and positions can be specified in pixels for pad, scale and overlay filters.

    0 讨论(0)
提交回复
热议问题