Several Webcams on One Machine

Материал из Rosalab Wiki
Перейти к: навигация, поиск

A problem with several webcams is USB bandwidth. By default, we couldn't attach more than one webcam to a single USB host.

We could tweak the webcam driver, so that it doesn't claim too much of USB.

modprobe uvcvideo quirks=128


echo 128 > /sys/module/uvcvideo/parameters/quirks

Note that the greater resolution you want, the less webcams you will be able to connect! I could attach three webcams to one host with width=426:height=320 (fps is unknown). (We used this webcam).

If a PC has several distinct USB hosts, webcams could be attached to different ones.

This page suggests that the number of cameras can be improved further by patching the kernel driver.

Here's a script I used for testing:

# Run with cmdline to pass to the driver
# Use something like width=75:height=48:noaudio
for i in /dev/video*;  do
       mplayer tv:// -tv device=$i:$1 &
       sleep 1

wait %1 %2 %3