Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.07k stars 1.51k forks source link

Output resolution wrong. #2176

Open viquanghoa opened 1 month ago

viquanghoa commented 1 month ago

I have a problem as below: Input video record by iphone have resolution is 1080x1920: Desktop-screenshot1

I will export a frame with below code:

video_clip = VideoFileClip(video_file)
# getting only first 3 seconds
clip = video_clip.subclip(0, 3)
# getting clip size
value = clip.size
# printing size 
print("Clip Size ", end = " : ")
# print(value)
clip.save_frame("video3.png", t = 3)

But output image wrong resolution (1920x1080): Desktop-screenshot2

Please help me! Thank you so much!

antonpetrov145 commented 4 weeks ago

Hello, you can declare the resolution in here video_clip = VideoFileClip(video_file, target_resolution="1080,1920")