0

When I save a clip using Moviepy it changes the aspect ratio or dimensions - the result is distorted. Here is the code:

from moviepy.editor import *
video = VideoFileClip("/Users/src/assets/img/trialVideo.mp4").subclip(0,10)
video.write_videofile("/Users/1.mp4",fps=60)
video.save_frame("/Users/1.png", 5)

Both 1.mp4 and 1.png have distorted resolutions. The original video was roughly 800 height and 400 width.

Any help would be fantastic!

kentonpalmer
  • 255
  • 2
  • 16

1 Answers1

0

Make sure that all pictures/videos have have same aspect ratio for example 1920x1080. Or make sure to compile it when writing the new video. My memory may fail me here, but I think you write compile=true after fps=60.

Xetra
  • 31
  • 2
  • I believe you are thinking of CompositeVideoClip which requires the parameter ``compose=True`` when dealing with clips of different sizes. The OP doesn't use CompositeVideoClip, so it may be a different issue. – Zulko Oct 08 '19 at 21:14
  • It would however solve his issue, but would of course require a re-write of the files which takes some time. But the issue would be fixed. – Xetra Oct 10 '19 at 11:30