Page 1 of 1

Two webcams

Posted: Mon Jul 06, 2015 7:20 pm
by aimc
I have successfully set up a motion security camera, i can even watch it from my browser and all that.

For another different project, i would need to be able to "switch" between two USB webcams connected to the pi. Do you think this is possible?

From what i understand, the USB bandwidth would be a problem, but the idea is to turn off one of the USB cameras (if necessary) while the other one is being used, so that each webcam records at its best.

(sorry my horrible english , i'm not a native speaker)

Re: Two webcams

Posted: Mon Jul 06, 2015 8:18 pm
by gordon77
It's possible

I posted some python later in this thread

Re: Two webcams

Posted: Tue Jul 07, 2015 2:10 am
by aimc
Great, i understand the code, the most relevant part here is just what i needed:

Code: Select all

camera = 0
cam ="/dev/video" +str(camera),(640,480))