I had a cheap IP camera running to check out the weather from the TV (computer). It’s getting a bit unreliable and the picture is now crap. So I decided to revamp with either a cheap 4 channel DVR from China for about $100 or a re-purposed older PC and video capture card.
A key requirement is to make it cheap and I didn’t really want to spend too much time on it. The DVR from China looked OK and should be quick to set up, but there were 2 questions that could not be answered without buying one; 1. is it really as good as it looks? 2. what is the web interface like? Having experienced software in cheap Chinese products before, I decided to move this option to the bottom of the list.
The next step was to look at ZoneMonder (ZM). I had experimented briefly with ZM about 3 years ago and had it almost working; and that PC was still setup. A bit underpowered it is a mini-itx 800MHz with 512MB ram and a 320G hard-drive running Ubuntu Server 10.04.
I looked at ZM and noted that there had been a few updates in that time. I downloaded version 1.25.0 and tried an install. Long story short, about 5 install attempts later I gave up on the mini-itx and moved to a Dell GX270 P4 3GHz with 1GB ram.
Ubuntu 11.10 server was the latest so I installed that; easy enough. Next install ZM version 1.24.? with “sudo apt-get install zoneminder”. After a bit of fiddling about and setup that went OK; but it wouldn’t display anything from the capture card (a cheap BT878A based card). Another long story short, I eventually tried the build from source option. This took ages to work out but eventually I had it running. Still no luck with the capture card; which was /dev/video0 and had the correct permissions etc. I did have an old web-cam as /dev/video1 showing a picture but it was only ever coloured bars and noise.
To verify the video sources I installed the Kubuntu desktop. This worked but didn’t look pretty; I think it had a problem with the Intel graphics chip in the GX270. Cheese and xawtv didn’t work but VLC did and would display video from the capture card. Now looking at the ZM log I spotted a lot of shared memory errors. Some more browsing suggested that this was an old problem; something to do with perl 32 and 64 bit integers. There was a patch to a memory.pl file but the instructions were not very clear. I would have thought that being an old bug it would have been patched in the latest version; apparently not.
A whole lot of browsing and reading later and I decided that ZM is a good idea but something is seriously wrong. It seems that most of the documented working systems are version 1.24.2 or 1.24.4 running on Ubuntu 10.04 or earlier vintage systems.
The next step is to install my standard Kubuntu 10.04 and a apt-get install ZM following the instruction from the ZM wiki . Unfortunately I only have Kubuntu 10.04 on SD card for USB booting and the GX270 won’t boot from the USB connected SD card. So the easiest thing is to download another copy of 10.04…. which has almost completed while I’ve been writing this.
Overall: ZM is a great concept and apparently a few people have managed to get it working. The documentation seems to be about 2 years behind the program which possibly still has some old bugs in it despite the recent version release.. The best bet is probably to forget about the latest version and latest version OS, and run a 3 year old system. This way you’ll find a lot more written help, installation examples and problem solving discussion.
Using a standard install to begin with and a cheap BT878 4-channel capture card I plugged in 2 cameras and set up 4 monitors (camera channels on the main page).
I’m getting the same picture through the 4 channels even though I have them sourced as video1(0), video1(1), video1(2) and video1(3). They are all set to 2fps, V4L1, PAL and 720×480. If set to RGB24 the system load is higher than if set to YUV420. Setting V4L2 also works but may have a higher system load.
Setting different image sizes, or other settings between the 4 inputs and it generally doesn’t work.
Full D1 spec seems to vary, ie:
PAL: Full D1 (704×576)
NTSC: Full D1 (704×480)
forsaa7130 chip card – Video Resolution:720×480(PAL),640×480(NTSC)
Also sometimes 720,576 (pal ?)
For the BT878 card, lspc returns:
01:08.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
01:08.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)