[gst-devel] newbie: multiple webcams?
Stefan Kost
ensonic at hora-obscura.de
Sun Aug 10 12:29:19 CEST 2008
Hi,
please keep the list in the loop.
Gerry Deckert schrieb:
> Stefan,
>
> I've just given input-selector a try and ran into trouble. The first camera comes up fine, but when I try to switch cameras (by setting the 'active-pad' property) the video on the next camera is frozen, or stutters through a few frames and then freezes. If I set my pipeline to STATE_NULL, then change the active-pad on the input-selector, then set the pipeline back to STATE_PLAYING it works as expected but there's a 1 second pause while switching, which defeats the purpose.
> Do you have any ideas why this might be the case, or if there is some combination of elements I could put upstream or downstream of the input-selector to improve its behavior? I've tested putting queues on either end, but with no visible difference. Any insight you could provide would be helpful!
I suspect timestamp issues. Can you try this:
v4l2src ! queue leaky=2 ! input-select name=sel ! ,,,
v4l2src ! queue leaky=2 ! sel.
...
Stefan
>
>
> Thanks,
>
>
> Gerry
>
>
>
> --- On Thu, 8/7/08, Stefan Kost <ensonic at hora-obscura.de> wrote:
>
>> From: Stefan Kost <ensonic at hora-obscura.de>
>> Subject: Re: [gst-devel] newbie: multiple webcams?
>> To: "Discussion of the development of GStreamer" <gstreamer-devel at lists.sourceforge.net>
>> Date: Thursday, August 7, 2008, 1:30 AM
>> hi,
>>
>> have you tried input-selector from gst-plugin-bad?
>>
>> Stefan
>>
>> Gerry Deckert schrieb:
>>> 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
>>>
>>>
>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move
>> Developer's challenge
>>> Build the coolest Linux based applications with Moblin
>> SDK & win great prizes
>>> Grand prize is a trip for two to an Open Source event
>> anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.sourceforge.net
>>>
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move
>> Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK
>> & win great prizes
>> Grand prize is a trip for two to an Open Source event
>> anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list