Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from import concatenate_videoclips
from skimage.filters import gaussian
from moviepy.editor import VideoFileClip, clips_array, concatenate_videoclips
def blur(image):
""" Returns a blurred (radius=4 pixels) version of the image """
return gaussian(image.astype(float), sigma=4)
# open video and resize to 460
clip1 = VideoFileClip("cat1.mp4").subclip(1,2).resize(width=200)
clip2 = VideoFileClip("cat1.mp4").subclip(2,4).resize(width=200)
clip3 = VideoFileClip("cat1.mp4").subclip(4,6).resize(width=200)
# blur clip 2
clip2_blurred = clip2.fl_image( blur )
# final
final_clip = concatenate_videoclips([clip1, clip2_blurred, clip3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment