This is less of a hint than it is just a "Here is my setup". I am posting this after receving a private message asking about it.
First, for a variety of reasons, I am currently running two essentially separate (though networked) servers.
The first is a
Dimension 2400 Series,Intel Celeron Processor at 2.4GHz
512 Megs of RAM
40 Gig ard Drive.
Got it with a cheap 17 monitor back in April directly from Dell for $399
This particular machine is currently hosting 4 NTSC cameras.
It contains 2 PCI cards for doing the capture (though it does not really need both). It has a 4 chip (bt878) card hosting 3 of the cameras and a 1 chip (bt878) card hosting one of the cameras.
The other computer is a dell dual processor dell
2.8GHz/1MB Cache, Xeon, 800MHz Front Side Bus for PowerEdge SC 1420
1 Gig RAM
1 80 Gig HD. (SATA)
Got this in May direct from dell for $1,023.00.
This machine is also my personal webserver so I installed an additional 160Gig SATA drive in it
Both machines are running CentOS 4.1 which is essentially a clone of Redhat Enterprise Linux 4.
I had to build a custom kernel since the default Centos Kernel does not include enough devices for the video for Linux stuff. I did not get too fancy with the kernel build and simply selected to build/include all of the V4Lin for every chipset as a module.
To make my life a little easier and get some RPMS that are not included in the normal redhat or centos distribution, I added the DAG respository (dag.wieers.com) to
/etc/yum.repo.d
so I gould do
yum install xawtv
And a few other RPMS
As for zoneminder, at the time I did the setup I did not see an RPM I wanted to use so I built from source (also allowing me to select better compiler options during the build)
On my "cheapo" server that has 4 cameras (all capturing at 640x480) my load varies from around .6 to even over 1 on a rainy day (I have my trigger thresholds set pretty low).
I did start to try to build some MMX/SSE optimizations for the zoneminder motion detection stuff and it looks like in some cases there is a lot to be gained there. This is hampered a bit by the somewhat poor structure of the zoneminder source code. Note that this statement is not meant to really pick on the ZM code since while I tend to write decent code, I rarely "finish" anything that I am working on for fun...So, while the ZM code may be poorly structured, it does work and the user experience is amazingly good for an open source product.
As for cameras I've got a few different models.
I am very happy with the performance of this model
http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... 5785952915
Note that the night vision capability of this camera is very good and probably the best I have.
The auction (and even the vendor website) claims that they have different lenses available but at least when I contacted them they did not so I am running 3 right now that have the default lens (well, 1 of the 3 is actually on a neighboors house connected via a non ZM approach)..
I've got 2 of these (which do have different lenses available)
http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... 5785952948
that I purchased but only one is currently installed.
The one that is installed is running with a non default lens (I think I got 8mm installed). I am generally happy with this particular camera though less so than the other one. Note that I am pretty sure I need to refocus the one I am running. When you get lenses from this vendor they do not install them.
There is some vignetting of the image with this lens as well. There did not appear to be adjustments that would correct for that.
Both cameras have good day and night ability. I also had originally gotten 2 other cameras from EBAY of a different style. One has since died (the power supply freaked out and probably killed it)
I would recommend being careful if you care about NV. The other generic NV cameras I got are Ok but they end up with some internal reflection from the LEDs that washes out part of the image. After taking apart the one that died I am pretty sure I can correct this problem on the one that is still working though I have not done it yet.
I would recommend 1/3 inch CCDs
After my power supply experiences (even from the "high quality" ones that some vendors are shipping) I am switching over so that I run several cameras from a single "PC" style power supply that I hope runs a little better.
Note I do also have some other external IR illumination that I originally got to help my "washed out" cameras though with the 2 models I posted links to I dont think you really need it.
My Servers
-
- Posts: 14
- Joined: Sun Apr 24, 2005 1:52 am
A little more info
This is one of the cards I am am running:
http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... RK:MEWN:IT
Note it does come with the ability to hook up 8 channels though if you go beyond 4 you are "sharing" a chip which means your framerate will (dramatically) suffer.
I have to run but I'll (finally) post some sample images later.
This is one of the cards I am am running:
http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... RK:MEWN:IT
Note it does come with the ability to hook up 8 channels though if you go beyond 4 you are "sharing" a chip which means your framerate will (dramatically) suffer.
I have to run but I'll (finally) post some sample images later.
-
- Posts: 14
- Joined: Sun Apr 24, 2005 1:52 am
Ok. This first picture is from that first camera I recommended.
It is taken at 2AM. There is no "visible" light in the yard at all.

There is an additional IR LED panel light that is helping out to some extent.
The house you can see across the street is a little more than 100ft away.
This next image is from the same brand/model of camera but there is no additional IR LED panel other than what is built in.

The bright light on the ride side of the field of view is a UV "bug zapper" light
The second house you see in the distance is about 80 ft away.
Note there is no additional visible light present however there is a porch light far past the ride side of the image in a house on another street that is providing some illumination on the backside of the house on the left.
Note this is not particularly visible to the naked eye.
Finally, this one is one of the older models I got from ebay that has the internal reflection problem

You can see the IR reflecting quite a bit off of the front license plate.
Quality is pretty poor. Camera does not automatically go into a black and white mode in the dark and still tried to provide color which leads to additional noise.
It is taken at 2AM. There is no "visible" light in the yard at all.

There is an additional IR LED panel light that is helping out to some extent.
The house you can see across the street is a little more than 100ft away.
This next image is from the same brand/model of camera but there is no additional IR LED panel other than what is built in.

The bright light on the ride side of the field of view is a UV "bug zapper" light
The second house you see in the distance is about 80 ft away.
Note there is no additional visible light present however there is a porch light far past the ride side of the image in a house on another street that is providing some illumination on the backside of the house on the left.
Note this is not particularly visible to the naked eye.
Finally, this one is one of the older models I got from ebay that has the internal reflection problem

You can see the IR reflecting quite a bit off of the front license plate.
Quality is pretty poor. Camera does not automatically go into a black and white mode in the dark and still tried to provide color which leads to additional noise.
-
- Posts: 14
- Joined: Sun Apr 24, 2005 1:52 am
As for the question about MMX/SSE optimized version...What I was attempting to do was to build a version of the source code that specifically made use of MMX and or SSE intrinsic subprograms within the code.
GCC (at least in versions before GCC 4.0) did not contain any ability to automatically vectorize normal code. Even the 4.0 version that contains some very basic abilities would likely not vectorize any of the loops in zoneminder partially because of how they are structured and partially because of the type of algorithm.
What makes this most diffucult is that the ZM code is quite monolithic and to some extent does not lend itself to nice small standalone test drivers that one can run repeated unit tests across known good test data and do nice repeated benchmarks.
Ideally, (both for things like this and tailoring setups) one would be able to run various modules in a standalone fashion reading data from a series of JPEG files. This could allow one to really get detailed zone statistics from the data in a non-realtime fashion and get a much better feel for how everything works.
Again I don't mean to belittle any of the work that has been done on ZM. It is quite complete in terms of functionality and seems relatively robust. It does look a lot like code that was written by one person for one person...Which is still better than 99% of the Open Source (or other) projects in the world that talk for years about development methodologies and then never finish (or start in some cases) anything.
I am not running any of my test sse/mmx routines on my actual servers yet so that should give you some indication that it is not at all ready for general use.
I am also sure that the pieces I have sped up are by no means the CPU hogs. This is a bad way to optimize but I thought I'd try some of the more simple routines first to get a feel for it.
The piece I did is some of the early thresholding code where zm checks for individual pixel differences crossing a threshold. At the moment on this piece I only get a 2x speedup. Other pieces could probably show something closed to 6-8x speedup.
If anyone is interested I could post some code fragments. Note the interest would have to be on the part of a developer not a user since nothing is really ready to "drop in" yet.
GCC (at least in versions before GCC 4.0) did not contain any ability to automatically vectorize normal code. Even the 4.0 version that contains some very basic abilities would likely not vectorize any of the loops in zoneminder partially because of how they are structured and partially because of the type of algorithm.
What makes this most diffucult is that the ZM code is quite monolithic and to some extent does not lend itself to nice small standalone test drivers that one can run repeated unit tests across known good test data and do nice repeated benchmarks.
Ideally, (both for things like this and tailoring setups) one would be able to run various modules in a standalone fashion reading data from a series of JPEG files. This could allow one to really get detailed zone statistics from the data in a non-realtime fashion and get a much better feel for how everything works.
Again I don't mean to belittle any of the work that has been done on ZM. It is quite complete in terms of functionality and seems relatively robust. It does look a lot like code that was written by one person for one person...Which is still better than 99% of the Open Source (or other) projects in the world that talk for years about development methodologies and then never finish (or start in some cases) anything.
I am not running any of my test sse/mmx routines on my actual servers yet so that should give you some indication that it is not at all ready for general use.
I am also sure that the pieces I have sped up are by no means the CPU hogs. This is a bad way to optimize but I thought I'd try some of the more simple routines first to get a feel for it.
The piece I did is some of the early thresholding code where zm checks for individual pixel differences crossing a threshold. At the moment on this piece I only get a 2x speedup. Other pieces could probably show something closed to 6-8x speedup.
If anyone is interested I could post some code fragments. Note the interest would have to be on the part of a developer not a user since nothing is really ready to "drop in" yet.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I have a couple of test harnesses that I've used to profile the code in past that you may be able to use. Alternatively if you feed me any mods that may help the optimisation process I can fold them in and let you experiment.
It's actually relatively easy to provide a fixed standard input particularly into the analysis daemons. I'm not sure if that's exactly what you are after though, but if there is something that would help you figure out the effect of your mods I'd be happy to help time permitting.
Phil
It's actually relatively easy to provide a fixed standard input particularly into the analysis daemons. I'm not sure if that's exactly what you are after though, but if there is something that would help you figure out the effect of your mods I'd be happy to help time permitting.
Phil