[gst-devel] newbie: multiple webcams?

Gerry Deckert gerry_deckert at yahoo.com
Thu Aug 7 02:47:35 CEST 2008


Hi all,

   I'm working on a Gstreamer / Python / Gtk project to debut at Burning Man in a few weeks, and I'm hoping to get some suggestions, insight, and pointers to examples.  I'm almost completely new to Gstreamer and the Python bindings, but I have gone through the App development manual and the Pygstreamer Tutorial.  I'm amazed at the speed and flexibility, and I'm convinced it's the right way to go with my project.
   Here's what I'm trying to do:  I want to take input from multiple usb webcams (v4lsrcs) at the same time, display video in a window from just one at a time, and have the ability to switch the feed smoothly from camera to camera.  Why would I want to do this you ask?  So I can set up a ring of cameras and create a bullet-time dance cage, of course.  :)
   I cobbled together something from various examples that more or less works, but I'm sure there's a better approach.  My initial attempt involved detaching and attaching cameras directly to xvimagesink, but this took too long for a smooth transition.  In my current setup, each camera is fed through its own videobox, all the videoboxes connect to a single videomixer, and the videomixer goes through ffmpegcolorspace to xvimagesink.  All the cameras are running at the same time, and I choose between them by setting the alpha channel on the videobox of the desired camera to 1 while all the others are 0.  This results in smooth switching, but I'm sure is not a good use of resources.  
   So, with that, I have lots of questions.  Is there a way to switch between sinks on the videomixer to accomplish the same effect?  Is there a fast way to turn the cameras on and off, or should I try turning them on and off in groups?  How could I enable recording of the video that's coming out?  I'm guessing I want to use a tee element, but how do I enable it on the fly?  What about toggling on/off some of the effectv plugins?  How could I grab single frames from the cameras?  I don't have a good understanding of what's involved in modifying the pipeline on the fly.  Is there some documentation or are there some examples anyone could point me to?  Suggestions?  Any help would be greatly appreciated!


   Regards,


   Gerry




More information about the gstreamer-devel mailing list