I use the below to convert my mp4 file to gif file. It worked fine but when I load the gif with browser or local tool, the gif is moving very slow. E.g. It was an animal moving from point A to point B, in the mp4, it moves like normal but when I converted it to gif, it moves 5times(estimate) slower than the mp4.
Code;
JavaScript
x
6
1
from moviepy.editor import VideoFileClip
2
3
videoClip = VideoFileClip("my-life.mp4")
4
5
videoClip.write_gif("my-life.gif")
6
Advertisement
Answer
try adding
(<your.gif>,fps=25,program='ffmpeg') or (<your.gif>,fps=25,program='imageio)
JavaScript
1
2
1
` videoClip.write_gif("my-life.gif", <one of the above goes here>")`
2