Jean Célestinos
Jean Célestinos

Reputation: 21

Function resize() from module moviepy isn't working

I'm trying to write a small program and in it I want to resize a clip but the function ain't working for some reason.

import easygui
from moviepy.editor import VideoFileClip
from moviepy.video.fx.resize import resize

pygame.init()
window = pygame.display.set_mode((500, 500))

run = True

def video():
    clip = easygui.fileopenbox()
    clip = VideoFileClip(clip)
    clip.resize((1920, 1080))
    clip.preview(fps=60)

while run:
    for event in pygame.event.get():
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_ESCAPE:
                video()
        elif event.type == pygame.QUIT:
            run = False

pygame.quit()

Upvotes: 0

Views: 1703

Answers (1)

Jean Célestinos
Jean Célestinos

Reputation: 21

I had to make clip = clip.resize((x,y)) to make the size change.

Upvotes: 2

Related Questions