Click to See Complete Forum and Search --> : USB Camera Issues


ruffyen
08-29-2009, 09:13 AM
Hi all,

I have a small issue that I would <3 to get worked out :). Here is the skinny of it. I have a laptop running Ubuntu 9.04. It has 3 USB ports. I have 2 Logitec Quickcam 4000's. I am using zoneminder for viewing the cameras.

The issue that I am running into is as follows. I can not seem to view both cameras at the same time. If I unplug one of the cameras the other will work fine and vice versa so I know the cameras work.

Here is the output of lsusb without the cameras

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

After plugging the cameras in
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 046d:08b2 Logitech, Inc. QuickCam Pro 4000
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 046d:08b2 Logitech, Inc. QuickCam Pro 4000
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

And the dmesg info after plugging both cameras in
[ 786.876048] usb 3-1: new full speed USB device using ohci_hcd and address 2
[ 787.218920] usb 3-1: configuration #1 chosen from 1 choice
[ 787.304368] Linux video capture interface: v2.00
[ 787.319968] pwc: Philips webcam module version 10.0.13 loaded.
[ 787.319976] pwc: Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.
[ 787.319983] pwc: Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,
[ 787.319990] pwc: the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.
[ 787.352071] pwc: Logitech QuickCam 4000 Pro USB webcam detected.
[ 787.352183] pwc: Registered as /dev/video0.
[ 787.509680] usbcore: registered new interface driver Philips webcam
[ 787.860090] usbcore: registered new interface driver snd-usb-audio
[ 794.964063] usb 2-1: new full speed USB device using ohci_hcd and address 2
[ 795.261930] usb 2-1: configuration #1 chosen from 1 choice
[ 795.303400] pwc: Logitech QuickCam 4000 Pro USB webcam detected.
[ 795.303498] pwc: Registered as /dev/video1.

Now according to the zoneminder website the issue that I am experiencing may be a limitation of the driver that I am using, in this case the pwc driver. On the website it says it can be fixed by:

USB bus problems. If you have multiple USB cameras on one bus then it can appear as if ZoneMinder is causing your cameras to fail. This is because the bandwidth available to cameras is limited by the fairly low USB speed. In order to use more than one USB camera with ZoneMinder (or any application) you will need to inform the driver that there are other cameras requiring bandwidth. This is usually done with a simple module option. Examples are usb_alt=<n> for the OV511 driver and cams=<n> for CPIA etc. Check your driver documentation for more details. Be aware however that sharing cameras in this way on one bus will also limit the capture rate due to the reduced bandwidth.

I looked around on the web using all the google-fu that I have available to me and I just cant seem to find what I am looking for. I was even going to make my first attempt at compiling the driver but I don't really know where to look for info regarding bandwidth limitations...nor do I really know where to place the driver source, and what to do after I make make install :).

Any assistance with this matter would be greatly appreciated. Thanks in advance.

ruffyen
08-29-2009, 09:27 AM
***UPDATE***

So I am able to get the cameras BOTH to function using xawtv.

IE i run

xawtv -c /dev/video0 &

then another instance

xawtv -c /dev/video1 &

http://www.otblive.com/cameras_working.png
and they both come up...

ruffyen
08-29-2009, 02:13 PM
***SOLVED***

So I guess the issue is a hardware limitation of the laptop, and the fact that the bus just can't handle the throughput. I dropped the FPS to aroun 10FPS on both cameras and it seems to be working fine now. I could reduced the picture size if I really needed the FPS but one of the camera's really isnt doing much except for monitoring an area while the other is actually acting as security and has motion detection on it. I bumped that camera up to 10FPS and the other one is at 2FPS as it really isnt necessary to have full FPS on the second one.

ph34r
09-01-2009, 12:52 PM
Yup, you'll want multiple USB buses, one for each cam. Those quickcams rock - I've done stop-motion movies of building construction with them, and live streaming via a darwin streaming server (F/OSS version of Apple's Quicktime streaming server). What pwc driver are you using? There is a new(er) one that doesn't require the pwcx binary blob...

ruffyen
09-01-2009, 05:52 PM
I am pretty sure that I am using the newest version of the driver available. How were you doing stop action videos?

pietronet
08-04-2010, 06:22 PM
Hi, I have a Logitech pro 4000 and ubuntu 10,04.
How did you manage to make it work in zoneminder?

Thx

Pierre

ruffyen
08-05-2010, 11:22 PM
This:
xawtv -c /dev/video0 &

Will verify that the camera is working

The output from:
zmu -d <device_path> -q -v

Gives you the information you need to know about the camera to fill out the camera details in zomeminder