Buy Me A Coffee

Hi !

Today I’ll share another cool sample using moviepy.

This one is easy and based on previous posts:

  • Open video and resize to 460
  • Open video, resize to 460 and speed to x4
  • Stack both videos
  • Export to Gif

The code is super simple

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")

Super, easy. It and the output is a 2MB gif file.

Source video, the full version is here.

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.

More info in https://beacons.ai/elbruno



¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

Leave a comment

Discover more from El Bruno

Subscribe now to keep reading and get access to the full archive.

Continue reading