Webcam log:
Install zoneminder
davidr@hgwells:~$ sudo apt-get install zoneminderFollow normal instructions for a zoneminder .deb installation:
sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf sudo apache2ctl restart sudo chmod 4755 /usr/bin/zmfix zmfix -a sudo chown www-data.www-data /usr/share/zoneminder/temp sudo vi /etc/sysctl.confAdd the following lines at the end of the file:
kernel.shmall = 250000000 kernel.shmmax = 250000000Pick up shared memory changes:
sudo sysctl -p kernel.shmall = 250000000 kernel.shmmax = 250000000I have 4 identical cameras plugged in. The order of video0-video3 may change if other cams, etc are added.
davidr@hgwells:~$ ls /dev/video* /dev/video0 /dev/video1 /dev/video2 /dev/video3Rather than use the video0 devices, there is a more fixed set of device links in /dev/v4l/by-id and /dev/v4l/by-path.
NOTE: there is a bug in zoneminder that the device name is limited. For some of my cameras, the by-id or by-path was truncated, and zoneminder couldn't find it.
davidr@hgwells:~$ ls /dev/video* /dev/video0 /dev/video1 /dev/video2 /dev/video3 davidr@hgwells:~$ ls /dev/v4l/by-path/ pci-0000:03:00.0-usb-0:2.1:1.0-video-index0 pci-0000:03:00.0-usb-0:2.2:1.0-video-index0 pci-0000:03:00.0-usb-0:2.3:1.0-video-index0 pci-0000:03:00.0-usb-0:2.4:1.0-video-index0So, to get around this problem, define my own paths:
davidr@hgwells:~$ sudo mkdir /cam davidr@hgwells:~$ sudo chmod 777 /cam davidr@hgwells:~$ cd /cam davidr@hgwells:/cam$ ln -s /dev/v4l/by-path/pci-0000\:03\:00.0-usb-0\:2.1\:1.0-video-index0 c1 davidr@hgwells:/cam$ ln -s /dev/v4l/by-path/pci-0000\:03\:00.0-usb-0\:2.2\:1.0-video-index0 c2 davidr@hgwells:/cam$ ln -s /dev/v4l/by-path/pci-0000\:03\:00.0-usb-0\:2.3\:1.0-video-index0 c3 davidr@hgwells:/cam$ ln -s /dev/v4l/by-path/pci-0000\:03\:00.0-usb-0\:2.4\:1.0-video-index0 c4 davidr@hgwells:/cam$ ls c1 c2 c3 c4 davidr@hgwells:/cam$Use a terminal window with
tail -f /tmp/zmdc.logto check for any zoneminder problems.
Open firefox to http:\\hgwells.local\zm to get to the web interface.
Add a new monitor. On the source tab, set the source to:
device : /cam/c1
PAL
YUUV
width:320
height:240
I was able to get two cameras up so far: 3 and 4 fail with dmesg :
[ 159.696321] usb 3-2.4: Not enough bandwidth for altsetting 3
[ 172.716216] usb 3-2.3: Not enough bandwidth for new device state.
Good info on USB in linux
* claim for 5 PS3 eye cameras with one USB3.0 card *
No comments:
Post a Comment