Skip to content

Instantly share code, notes, and snippets.

@elbruno
Created May 20, 2021 13:24
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/b1ecf3f24b211e4fd0c860cf96d2f2b3 to your computer and use it in GitHub Desktop.
Save elbruno/b1ecf3f24b211e4fd0c860cf96d2f2b3 to your computer and use it in GitHub Desktop.
moviepystackvideos.py
from moviepy.editor import VideoFileClip, clips_array, vfx
clip11 = VideoFileClip("cat1.mp4").margin(10)
clip21 = VideoFileClip("cat2.mp4").margin(10)
clip12 = clip11.fx( vfx.mirror_x)
clip22 = clip21.fx( vfx.mirror_y)
final_clip = clips_array([[clip11, clip21],
[clip12, clip22]])
final_clip.resize(width=480).write_videofile("stacked_vid.mp4")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment