from moviepy.editor import VideoFileClip clip = VideoFileClip("input_video.mp4") small_clip = clip.resize((640, 360)) small_clip.write_videofile("output_video.mp4")
from moviepy.editor import VideoFileClip clip = VideoFileClip("input_video.mp4") large_clip = clip.resize((1920, 1080)) large_clip.write_videofile("output_video.mp4")This code resizes the input video clip to a larger size of 1920x1080, and saves the new video clip as output_video.mp4. Package library: MoviePy.