Zulko / moviepy

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

Speedx is not working the way it should #2127

Open merjekrepo opened 3 months ago

merjekrepo commented 3 months ago

Hi,

I am trying to get gif out of a video using the moviepy module. I have the following code:

from moviepy.editor import *
clip = VideoFileClip("magicstat_introductory_video.mp4")
clip = (
        clip.
        subclip(0, 5).
        resize(0.5).
        speedx(1.0)
        )
clip.write_gif("magicstat_introductory_video.gif", fps=30)

If I use it on this video, I get this gif. The problem is that I don't get the clip at the same speed of the video in that gif output when I use 1.0.

Am I not supposed to get it at the same speed if I use 1.0 as the speedx parameter?

TimSchneider42 commented 2 months ago

Hi,

I believe the problem you are seeing is caused by #2151. As a workaround, you can try to set your FPS to 30/1000, which should cancel out the unit conversion error.

Best, Tim

merjekrepo commented 2 months ago

Hi,

I believe the problem you are seeing is caused by #2151. As a workaround, you can try to set your FPS to 30/1000, which should cancel out the unit conversion error.

Best, Tim

Well, I gave up long time ago and started using ffmpeg instead.