Last active
August 29, 2015 14:09
-
-
Save markwingerd/e0574687b624a6ff787f to your computer and use it in GitHub Desktop.
GStreamer Tutorial 2: Part 1/3 - Streams multimedia using Playbin2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gst | |
# Create the pipeline and bin | |
output_bin = gst.Bin('output_bin') | |
# Create the elements. | |
media_source = gst.element_factory_make('playbin2', 'media_source') | |
decode = gst.element_factory_make('decodebin', 'decode') | |
convert = gst.element_factory_make('autoconvert', 'convert') | |
solarize = gst.element_factory_make('solarize', 'solarize') | |
video_sink = gst.element_factory_make("autovideosink", "video_sink") | |
# Ensure all elements were created successfully. | |
if (not output_bin or not media_source or not decode or not convert or | |
not solarize or not video_sink): | |
print 'Elements could not be linked.' | |
exit(-1) | |
# Configure our elements. | |
#media_source.set_property('uri', 'file:///home/reimus/Public/sintel_trailer-480p.webm') | |
media_source.set_property('uri', 'http://docs.gstreamer.com/media/sintel_trailer-480p.webm') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment