Skip to content

Instantly share code, notes, and snippets.

View green-anger's full-sized avatar

Andrey L. green-anger

View GitHub Profile
@dplanella
dplanella / gist:5563018
Last active September 13, 2017 08:19
A snippet to create thumbnails from video files, using GStreamer and Python. Original author: [daf](http://stackoverflow.com/users/32082/daf) via http://stackoverflow.com/a/16478342/1049318
# Video thumbnailer, non-PyGI version, working as expected
import os
import sys
import gst
def get_frame(path, offset=5, caps=gst.Caps('image/png')):
pipeline = gst.parse_launch('playbin2')
pipeline.props.uri = 'file://' + os.path.abspath(path)