Posts Tagged ‘movie’

MoviePy: script-based movie editing

January 25, 2014 Leave a comment

I haven’t tried it yet but it looks awesome.

MoviePy is a Python module for script-based movie editing, which enables basic operations (cuts, concatenations, title insertions) to be done in a few lines. It can also be used for advanced compositing and special effects.”

Example: putting some clips together:

import os
from moviepy.editor import *
files = sorted( os.listdir("clips/") )
clips = [ VideoFileClip('clips/%s'%f) for f in files]
video = concatenate(clips, transition = VideoFileClip("logo.avi"))
video.to_videofile("demos.avi",fps=25, codec="mpeg4")

The author of MoviePy shows how to manipulate GIF files with MoviePy:

Categories: python Tags: ,