moviepy icon indicating copy to clipboard operation
moviepy copied to clipboard

Speedx is not working the way it should

Open merjekrepo opened this issue 1 year ago • 2 comments

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?

merjekrepo avatar Mar 05 '24 20:03 merjekrepo

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

TimSchneider42 avatar Apr 10 '24 14:04 TimSchneider42

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.

merjekrepo avatar Apr 10 '24 21:04 merjekrepo

Thank you for your contributions and for reporting issues in this repository. With the release of v2, which introduces significant changes to the codebase and API, we’ve reviewed the backlog of open PRs and issues. Due to the length of the backlog and the likelihood that many of these are either fixed or no longer applicable, we’ve made the decision to close all previous PRs and issues.

If you believe that any of these are still relevant to the current version or if you'd like to reopen a related discussion, please feel free to create a new issue or pull request, referencing the old one.

Thank you for your understanding and continued support!

OsaAjani avatar Jan 10 '25 21:01 OsaAjani