Skip to content

Instantly share code, notes, and snippets.

View abhimanyu1289's full-sized avatar

Abhimanyu Pamulapati abhimanyu1289

View GitHub Profile
@abhimanyu1289
abhimanyu1289 / convert.py
Created July 4, 2017 10:38 — forked from michaelosthege/convert.py
Convert MP4/AVI clips to GIF with a single Python function
import imageio
import os, sys
class TargetFormat(object):
GIF = ".gif"
MP4 = ".mp4"
AVI = ".avi"
def convertFile(inputpath, targetFormat):
"""Reference: http://imageio.readthedocs.io/en/latest/examples.html#convert-a-movie"""