MoviePy: script-based movie editing
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: http://zulko.github.io/blog/2014/01/23/making-animated-gifs-from-video-files-with-python/.