Reputation: 1785
I have tried to generate a simple GIF file from this video. My code is below:
from moviepy.editor import *
clip = (VideoFileClip("Mighty Kungfu Panda 'Skadoosh'.mp4").subclip((0,0.18),(0,0.21)).resize(0.3))
clip.write_gif("skadoosh2.gif")
But GIF is not generating properly. All i can see, an image of the starting scene of the clip. I have tried different parameters with subclip(). But the result has remained same.
Upvotes: 0
Views: 475
Reputation: 3780
The problem is that 0.18 and 0.21 refer to fractions of seconds, so you are asking for a clip of duration 0.03 !!
Instead, if you want the clip between t=18s and t=21s, use subclip(18, 21)
Upvotes: 2