6 USB cameras at 640 x 480 won't all work at the same time

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
magooslum
Posts: 7
Joined: Mon Jul 05, 2010 10:52 pm

6 USB cameras at 640 x 480 won't all work at the same time

Post by magooslum »

Hi,

I have a ZM 1.24.2 system working under Ubuntu 10.4 LTX Server. Attached are six Logitech C250 cameras. They all work at the same time at 320 x 240 resolution and I've limited the frame rate to 4 fps. I also have the kernel.shmall and kernel.shmmax set to 134217728 as suggested often.

My problem is that the cameras are capable of 640 x 480 resolution and yet I am only able to set any two of the six to that. If I set a third, fourth, fifth, or sixth to the higher res, only two of the higher res. ones remain working.

I had considered that there may be a bandwidth issue... and possibly that is so. I am running a motherboard with 14 USB ports on various chips, 4GB ram, and a dual core AMD processor (5600+ ?). My CPU load is only a few percent per camera.

Does anyone have a suggestion on how to get beyond this problem? I'd live to be able to run a few more at the higher res. even if it is not possible to run them all that way. Bottleneck in V4L2 ?? They are set as PAL YUYV cameras, btw.

My server screen does spit out the following error:
uvcvideo: Failed to submit URB 0 (-28)
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

My experience: shared memory setting. This setting is cumulative for all cameras in use at one time. Search the forums for a formula to calculate what you need total, someone posted exactly how to figure this. Personally I just keep increasing incrementally until everything works (just lazy).
magooslum
Posts: 7
Joined: Mon Jul 05, 2010 10:52 pm

Post by magooslum »

Is this different than the shmall / shmmax settings? Because I've tried doubling those from 128MB to 256MB and it didn't seem to matter. I've got plenty of ram so I suppose I could bump it further and see what happens... but clarification on what you are suggesting would be appreciated.

Also knowing if this is pretty much what you experienced (finite number of cameras working at higher res) when bumping the settings started making things work.

I was thinking that dropping the frame rate would solve any issues but it doesn't seem to. Possibly I should stagger the fps values and prevent any synchronous attempts at frame grabs. Maybe ZoneMinder fails to stagger them and so even at a low frame rate they all try to happen at the same time!

Thanks for your reply, btw.
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

Exactly. Shmall / shmmax is what I'm referring to. I've been reading a lot of usb issues and they would all normally be shared memory issues if not for the usb component. I'm guessing of course as I don't use any usb cameras so please experiment and report your findings. And yes, as I've added cameras at higher resolutions and had to add to the shared memory (/etc/syctl.conf) or a monitor source (random) would turn red, a tell tale symptom. And yes again, dropping frame rate seems(?) to help (there is a formula posted for this, ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead) but in my experience with IP and analog cameras bumping the shared memory settings has always fixed the issue. I'm also guessing that usb sources are using this resource in a different way then a frame grabber or IP cameras because of all the posts.
rrntal
Posts: 5
Joined: Sat Aug 14, 2010 2:25 pm

can't get a single c250 logitech webcam to work

Post by rrntal »

I bought 6 of them thinking this would be an easy task but in the console I get a red link at /dev/video0 and probing for cameras I get an abnormal exit status of '255'

magoo, can you tell me what i'm doing wrong?
Post Reply