Page 1 of 1

Capturing images from multiple webcams?

Posted: Thu Sep 30, 2010 1:55 pm
by thatkeith
Is it possible to capture image data from multiple webcams (basically any cheap USB-connected cameras) simultaneously? (Near-simultaneous would be fine, I'm not worried about the precise definition of the word. ;-)

I want to be able to grab a single still image/frame from each camera, as part of a Rev (now LiveCode) experiment and art project. Does anyone have any suggestions?

Thanks! - Keith

Re: Capturing images from multiple webcams?

Posted: Thu Sep 30, 2010 1:59 pm
by Klaus
Hi Keith,

I may be wrong, but I am afraid that the "RevVideoGrabber" only supports one cam at a time.


Best

Klaus

Re: Capturing images from multiple webcams?

Posted: Thu Sep 30, 2010 2:03 pm
by thatkeith
I wondered whether that might be an issue.

Two devious (and hence probably futile) ideas occured to me...
(1) Can selecting the cam source be controlled by script?
(2) Alternatively, could multiple copies of a standalone be made to work with different cam inputs at the same time, or is the input selection actually a one-at-a-time, system-level thing?

Keith

Re: Capturing images from multiple webcams?

Posted: Thu Sep 30, 2010 2:22 pm
by Klaus
Hi Keith,

1. I think "revVideoGrabSettings" will also contain the source of the video,
so switching by script with "revSetVideoGrabSettings" should "restore" the input, too.
Do some tests to be sure.

2. Sound doable, but I don't know if this is possible, do some tests :D


Best

Klaus

Re: Capturing images from multiple webcams?

Posted: Fri Oct 15, 2010 3:54 pm
by thatkeith
Klaus wrote:1. I think "revVideoGrabSettings" will also contain the source of the video,
so switching by script with "revSetVideoGrabSettings" should "restore" the input, too.
Hmm. Well, it seems that, contrary to my surface-level attempts at logic, Rev/LiveCode doesn't play ball in this way; it doesn't let me juggle video input settings on the fly within one lump o' script.

I edited the Video Capture example so that the Video Settings button called & captured two input settings, stored in two different stack-level custom properties. Then I scripted a button to use the first settings, grab an image, store the imageData in an image object... then do the same with the second stored input settings and a second image object.
No luck; I always just get the same image in both, not one from each camera. I'll experiment more tonight, but this may not be workable.

Next step, separate apps! :-)

Keith

Re: Capturing images from multiple webcams?

Posted: Wed Apr 27, 2011 8:21 pm
by karmacomposer
So, from this thread, is it safe to assume that Live Code cannot be used to create a webcam community video program where people can talk to each other through chat and video? This was one of the things I was hoping to accomplish with Live Code. I do not need to 'capture' the video, as in saving it to disk, but more just show the streams. I do have a Red5 server already in place and can host as many as 300 concurrent streams. I was hoping to make a program where people could log on and talk with each other, one on one or as a group. I was also going to customize my client's mysql database to work with this webcam project.

Is it at all possible?

Mike

Re: Capturing images from multiple webcams?

Posted: Wed Apr 27, 2011 8:47 pm
by Klaus
Hi Mike,

I strongly doubt that this is possible!


Best

Klaus

Re: Capturing images from multiple webcams?

Posted: Wed Apr 27, 2011 9:12 pm
by karmacomposer
Klaus wrote:Hi Mike,

I strongly doubt that this is possible!


Best

Klaus
That is too bad. Now I have to spend $600 on another script that CAN do this. Damn. I was hoping this would work because the database integration sounds to be a MUCH easier task than straight php and mysql.

Mike