How to combine 2 videos of different resolution/aspect ratio/frames

Akh*_*N S 1 python video-editing moviepy

What are the things we need to consider while combining two videos

Does Aspect ratio has any importance while combining two videos

Does the no of Frames has any relation while combining the videos

I am trying to combine two videos of different resolutions, frames rate and aspect ratios using Python Movie.Py

final_clip = concatenate_videoclips([video1, video2], method='compose')
Run Code Online (Sandbox Code Playgroud)

When I tried videos with different resolutions the but the resutant video was not what I expected

在此输入图像描述

tbu*_*s13 7

如果两个视频具有不同的分辨率和宽高比,将它们连接在一起method=compose会在较小的视频周围放置黑色边框,使其与最大的视频大小相同。如果您不\xe2\x80\x99 不想要黑色边框,那么您将需要使用resize来调整它们的大小,使它们的大小相同。

\n\n

Here\xe2\x80\x99s文档中的一些调整大小示例:

\n\n
>>> myClip.resize( (460,720) ) # New resolution: (460,720)\n>>> myClip.resize(0.6) # width and heigth multiplied by 0.6\n>>> myClip.resize(width=800) # height computed automatically.\n
Run Code Online (Sandbox Code Playgroud)\n\n

连接不同帧速率的视频时,\xe2\x80\x99 不应该有任何问题。

\n