Skip to content

Instantly share code, notes, and snippets.

@elbruno
Created May 25, 2021 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elbruno/6a228086d5840570f68c7eaa4c1a3568 to your computer and use it in GitHub Desktop.
Save elbruno/6a228086d5840570f68c7eaa4c1a3568 to your computer and use it in GitHub Desktop.
moviepysppedx4creategif.py
from moviepy.editor import VideoFileClip, clips_array, vfx
# open video and resize to 460
clip1 = VideoFileClip("cat1.mp4").subclip(1,5).resize(width=460)
# open video, resize to 460 and speeed to x4
clip2 = VideoFileClip("cat1.mp4").subclip(1,5).resize(width=460).speedx(4)
# final
final_clip = clips_array([[clip1, clip2]])
final_clip.write_gif("speeddemo.gif")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment