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. Oli ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hoi Oli,
You can't use the same video mixer element in separate pipelines, it can only belong to a single pipeline. So your second option can only work if you do the mixing outside of GStreamer. You could take a look at pigment to see if that works for you (pigment offers an opengl videosink that does scaling and other linear transformations, alpha blending, and layering, all using acceleration from the video card). Within your application you would then have completely independent pipelines, each using a playbin2 with pgmimagesink as the video sink. You then define the positioning and transparency of each video sink using pigment commands. The first option is the only one if you need to save the blended video in a file or send it over the network. In that case, you'll need an event probe on each sink pad of the videomixer to detect the EOS events. Instead of letting the EOS pass into the mixer, you disconnect the pad and connect a new decoder chain instead. Take a look at the source of playbin2 for some inspiration. Regards, Arnout On Tuesday 07 July 2009 09:07:50 Oliver Yu wrote: > 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. > > Oli > > --------------------------------------------------------------------------- >--- Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/blackberry > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: D206 D44B 5155 DF98 550D 3F2A 2213 88AA A1C7 C933 ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |