Archive
Posts Tagged ‘gif’
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: http://zulko.github.io/blog/2014/01/23/making-animated-gifs-from-video-files-with-python/.
