Hikvision DS-2CD2132F-I

Post here to indicate any hardware you have used and which is known to work with ZoneMinder. Not for questions.
Post Reply
ConcreteRooster
Posts: 24
Joined: Fri Jan 24, 2014 6:22 pm

Hikvision DS-2CD2132F-I

Post by ConcreteRooster » Mon Jan 23, 2017 9:49 pm

Hikvision seems to be pretty popular with Zoneminder. Seems like there are lots of people using these cameras with success. I haven't seen my specific model - DS-2CD2132F-I - mentioned in ZM context. However, it seems to more or less work right out of the box.

I first referenced the Zoneminder Wiki Page for Hikvision. I started out using the URL that was mentioned in the linked blogpost, i.e.:

Code: Select all

    rtsp://username:password@192.168.1.120:554/cam/realmonitor?channel=1&subtype=0?tcp
This more or less worked. Though once I actually started defining my zones within ZM, I was getting lots of false alarms due to smearing/pixelation/garbled images. First thing I did to try to fix this was set the "I Frame Interval" to the same as my FPS settings: 15. Note, both the FPS and I Frame settings are in the actual camera's config, not ZM. This did not help with the smearing. So then I googled "hikvision rtsp url" and found this interesting page: Hikvision IP camera URL. So I thought maybe I'd try another URL. I changed the URL to this:

Code: Select all

    rtsp://username:password@192.168.1.120:554//Streaming/Channels/1
Which, ironically, is what the ZM Wiki recommends. (I don't know why I didn't try that first, and instead went with what that blog said.) Anyway, when I changed the URL, I also changed the "Remote Method" from RTP/Unicast to RTP/RTSP. I couldn't find any documentation on what these actually mean. I have a vague intuitive notion, but a precise definition would be helpful.

Anyway, not sure if it was the URL and/or the Remote Method change, but so far the smearing seems to be gone. Oh, I also lowered the sensitivity on one of my zones, so maybe that fixed it too. :oops: Anyway, the camera certainly works, and I just wanted to have a hit when people web search "zoneminder DS-2CD2132F".

I currently have the camera itself set to 1280x720 resolution and 15 FPS. Zoneminder's resolution is set to the same, 32bpp colorspace, and max FPS of 30. This is my first time using ZM, so I might still tweak the FPS and/or resolution settings.

This is on Zoneminder 1.30.0 running under CentOS 7.3, installed via zmrepo.

FWIW, this camera shipped with firmware version "V5.4.0 build 160530".

More FWIW: I purchased this camera from Amazon (I'm in the USA). It wasn't sold by Amazon directly, but via third-party. As far as I can tell, it is a true retail-boxed USA version, and, if I wanted to, I could theoretically install new firmware. However, I'm trying to determine if I actually have the three-year manufacturer warranty or not. Based on what I've read, it appears that you have three options for buying a Hikvision camera in the USA:
  • Buy a "grey market" camera from somewhere like eBay, AliExpress. This will be the cheapest option. However, you almost certainly won't get any warranty with it; and though it may ship configured for English, if you upgrade the firmware it will revert back to Chinese.
  • Buy a "lighter shade of grey" market camera from a non-authorized USA retailer. Middle-priced option. If you go to the Hikvision USA website, at the very top right there is a link for Authorized Distributors. If the seller is not on this list, they may not be authorized (though you can ask to be sure). Upside is you should get a full-color retail-boxed product that was made to be sold in the USA (meaning you can upgrade the firmware and it will stay in English). Downside is you probably won't get the manufacturer's warranty.
  • Buy from a truly authorized distributor, as listed on the Hikvision website. Highest-priced option, but no worries about grey market products or firmware upgrades or warranty issues.
Hope this helps anyone interested in Zoneminder and Hikvision cameras, and specifically the DS-2CD2132F-I.

ConcreteRooster
Posts: 24
Joined: Fri Jan 24, 2014 6:22 pm

Re: Hikvision DS-2CD2132F-I

Post by ConcreteRooster » Wed Jan 25, 2017 10:38 pm

Just to give a little more info on this setup:

System is running CentOS 7.3. Running ZM 1.30.0, installed from zmrepo. I re-purposed an old PC that I'd been meaning to give away. AMD Athlon X2 3600+, 2 GB RAM. (This is an oldish CPU, before AMD started integrating video into their CPUs; DDR2 memory.) A quick review of a CPU comparison suggests that my CPU is generally outclassed by a Celeron J1900 (a modern but low-end CPU). Realtek RTL8111 1gbps NIC on motherboard.

Running at 1280x720, 15 FPS. A quick look at top shows the zmc process generally hovering around 20-30% CPU, and the zma process in the 20-40% range. I have Munin running on this system, and the CPU usage graph shows my user processes pretty consistently using just under 70% of CPU. Zoneminder is the only thing running on this server that generates any real load. Munin Load Average graph hangs around 0.75.

Based on these numbers, a second identical camera at the same resolution and framerate will probably overload this system (since I'm generally well over 50% CPU resources).

Again, just throwing out more info in hopes someone else finds it useful!

ConcreteRooster
Posts: 24
Joined: Fri Jan 24, 2014 6:22 pm

Re: Hikvision DS-2CD2132F-I

Post by ConcreteRooster » Tue Jan 31, 2017 2:39 pm

Update: since the hardware I previously mentioned (X2 3600 / 2GB RAM) clearly couldn't handle two cameras with the settings I'm currently using (1280x720 / 15FPS), I went ahead and upgraded. Now I'm running a quad-core i5-6500 and 8GB RAM. Overkill for this application, but very high value based on the research I did. Side note: during initial testing of the new motherboard/CPU/RAM, I found that the system draws about 15 watts from the wall when idle. That's with a single SSD connected, measured using a Kill-a-Watt meter. I'm in the USA, so 110v mains. PSU was a picoPSU (I forget what wattage its rated for, one of the higher spec'ed ones; I also forgot to note the power brick I was using). Motherboard is ASRock H110M-ITX/ac (a nice perk is that it has an actual Intel NIC onboard, rather than the cheaper Realtek stuff you usually get on budget motherboards).
ConcreteRooster wrote:(With X2 3600 / 2GB RAM) Running at 1280x720, 15 FPS. A quick look at top shows the zmc process generally hovering around 20-30% CPU, and the zma process in the 20-40% range. I have Munin running on this system, and the CPU usage graph shows my user processes pretty consistently using just under 70% of CPU. Zoneminder is the only thing running on this server that generates any real load. Munin Load Average graph hangs around 0.75.
With the new hardware, a quick look at top shows zmc hanging around 20% CPU, and zma around 10%. Munin CPU usage graph for user processes is showing about 25% CPU; load average generally just under 0.20.

Based on these numbers, I think this new hardware could comfortably handle eight cameras (assuming they all had similar settings). Obviously if I lower resolution and/or FPS, I could support even more cameras.

ConcreteRooster
Posts: 24
Joined: Fri Jan 24, 2014 6:22 pm

Re: Hikvision DS-2CD2132F-I

Post by ConcreteRooster » Fri Feb 24, 2017 8:46 pm

I'm turning this into a mini-blog of sorts!

Anyway, I just realized this camera also supports a secondary low resolution "sub stream". So, in Zoneminder, I set up a second monitor to do a constant record on this substream. Defaults for the substream are 352x240, 30 FPS. After ZM's conversion to JPEG, this results in about 1.9 GB of storage used per hour. (Yes, 30 FPS is way too high for something like this, but I don't have access to my camera's admin password at the moment, so can't crank that down. Clearly, halving that to a more sane 15 FPS would also halve the storage requirement.)

However, see this thread, "Script to convert all events to daily videos". There are a few implementations of the same idea (one of them mine, shameless plug), but the gist is you can convert the stream of JPEG files to a single video file using ffmpeg, and an efficient video codec like h.264 will shrink the space requirement considerably.

I just tested converting about 4.5 hours of ZM JPEGs. Raw JPEG size was about 9 GB. The resulting mkv (h.264) file produced by ffmpeg is 134 MB. To be fair, there were virtually no events during this time, so it's 4.5 hours of mostly static image. Lots of activity would have made for a bigger video file.

I've seen this idea mentioned elsewhere on the forums: the substream, to me, gives the best of both worlds: you can keep relatively small full-time archival video footage using the low resolution feed (i.e. substream); and at the same time use the standard high resolution stream for motion detection and event capture. Just note keeping the low resolution archival stream in series-of-JPEG format is very inefficient in terms of disk space utilization, but that is easily remedied with a readily available script.

For this particular camera (Hikvision DS-2CD2132F), access the substream by changing the "1" to a "2" in the URL, i.e.:

Code: Select all

    rtsp://username:password@192.168.1.120:554//Streaming/Channels/2

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests