[gst-devel] Controlling multiple streams with a videomixer.
oliyu at yahoo.com
Tue Jul 7 09:07:50 CEST 2009
I hope this isn't a newbie kind of question, but I haven't been able to find a working answer. I'm trying to mix multiple media streams together with a video mixer, but I need events about the individual streams, so that I can continue to mix in new streams, since the streams can be very different lengths. The two main methods that I have tried are:
1. Create a full pipeline containing multiple streams. This works for the playback, but I'm having problems getting the end of stream events for the shorter videos. Is there something I need to do to tie events to the individual streams?
here's my test launch definition:
player = gst.parse_launch("""
filesrc name=mp3src ! decodebin ! audioconvert ! audioresample ! pulsesink
filesrc name=videosrc1 ! dvddemux name=demux ! mpeg2dec ! ffmpegcolorspace
! videomixer name=mix ! ffmpegcolorspace ! videoscale
! video/x-raw-yuv,width=800,height=600 ! sdlvideosink name=view
filesrc name=videosrc2 ! dvddemux name=demux ! mpeg2dec ! ffmpegcolorspace
2. I've also tried constructing invidividual playbins for each media stream. Since each are individual pipelines, I'm getting the events for all the individual streams. But I'm having problems mixing the vstreams together. I connect up each playbin to an alphacolor element as the video-sink, but as soon as try to link the alphacolor elements to a videomixer, I get the following error:
test.py:10865): GStreamer-WARNING **: Element alphacolor0 already has parent
(test.py:10865): GStreamer-WARNING **: Trying to connect elements that don't share a common ancestor: vscale and alphacolor0
Which way is the "right" way? Is there any good examples to do this properly?
I'm using GStreamer 0.10 on Ubunto 9.10 and I'm using the gst-python bindings.
More information about the gstreamer-devel