Open 0lm opened 6 years ago
from moviepy.editor import *
# Load the video clips
clip01 = VideoFileClip("test.mp4")
clip02 = VideoFileClip("food.webm")
clip03 = VideoFileClip("sun.mp4")
# Calculate the highest frame rate among the clips
max_fps = max(clip01.fps, clip02.fps, clip03.fps)
# Adjust the frame rate of each clip to match the highest frame rate
clip01 = clip01.speedx(factor=max_fps/clip01.fps)
clip02 = clip02.speedx(factor=max_fps/clip02.fps)
clip03 = clip03.speedx(factor=max_fps/clip03.fps)
# Concatenate the adjusted clips with black bars using the 'compose' method
final_clip = concatenate_videoclips([clip01, clip02, clip03], method="compose")
# Write the final video to a file
final_clip.write_videofile("result.mp4", fps=max_fps)
Expected Behavior
merging videos with method=compose expection: fluently merged videos with back bars when they dont have same aspect ration/resolution (because highest hight and width are the leading ones when merging videos)
Actual Behavior
merging with black bars worked. but unfortunately there is a problem with the frame rate. all videos have different FPS. but the highest FPS is the leading one and that doesnt look good for many videos. are played too fast (skipped too many frame).
is there a possibility to keep the different FPS in combination with compose method (still having black bars) ? or is there an option to keep different FPS in one video at all?
Steps to Reproduce the Problem