Hikvision DS-2CD2032-I camera image glitches

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
ScottBouch
Posts: 43
Joined: Sat Oct 26, 2013 2:58 pm

Hikvision DS-2CD2032-I camera image glitches

Post by ScottBouch » Mon Oct 27, 2014 11:49 pm

Hi all,

I've just moved house and am having a bash at my second ZoneMinder (v1.28.0) install. So I'm still learning a lot, and am very open to criticism / suggestions.

The Zoneminder part of it is great, Ubuntu Server, running on a super duper ex corporate Dell 1U server computer with dual quad core processors (x8), 6GB ram, SSD, etc...

But I am having an issue with a camera I've just installed... As the title would suggest it's a 3 Mega Pixel Hikvision DS-2CD2032-I.

Every so often, I get 4 seconds of images with glitches, this triggers Zoneminder off to record, so each day I'm amassing hundreds of garbage recordings.

It may be that the camera settings could be improved on.. I'll publish these further down. The camera is connected to the server via a Netgear 10/100Mb/s hub. It's powered by passive PoE (Injector / Extractor) and the Ethernet cable is only about 5m long.

However, I have a long Cat6e cable from this hub to my wireless router, so I can also view the camera feed directly from any computer, and yes, it happens on all viewers: with VLC player using rtsp link; XBMC / Openelec (raspberry pi reading a .strm file containing the rtsp link); VLC on my android phone etc.. So I think the issue is more the camera or network.

A good image from Zoneminder:

Image

Here are some of the glitches recorded by Zoneminder:

Image
Image
Image
Image
Image
Image


Camera Settings:

Image


ZM Settings:

Full source path:

Code: Select all

rtsp://admin:12345@192.168.1.51:554/cam/realmonitor?Channel=1&subtype=0?tcp
Image | Image
Image | Image


Can / should I lower the FPS from 25? Does it need to be that high for CCTV? Can / should I lower the resolution?

Is it too much data for my 100MB/s network?

Or have I got a camera issue? is it in need of a firmware update?

Any hints would be welcomed.

Thank you, Scott.

ScottBouch
Posts: 43
Joined: Sat Oct 26, 2013 2:58 pm

Re: Hikvision DS-2CD2032-I camera image glitches

Post by ScottBouch » Tue Oct 28, 2014 11:22 am

I also noted that from zoneminder, I can't download videos of my events, only a bunch of still images. These images equate to about 4 to 6 images per second, the camera is set to 25fps - is this normal?

The camera is set to H.264 format, would changing this help?

I have also just written to the ebay seller who sold me the camera asking for tech support on this too... Doubtful if they will be able to help though, unless they refer it to Hikvision...

Cheers, Scott

ScottBouch
Posts: 43
Joined: Sat Oct 26, 2013 2:58 pm

Re: Hikvision DS-2CD2032-I camera image glitches

Post by ScottBouch » Tue Oct 28, 2014 11:08 pm

The seller has been really helpful,

He showed me how to remotely reboot the camera... and I hate to temp fate, but so far, so good (an hour or so)...

The proof will be over the next few days to see if any more false events are captured.

Cheers, Scott

carcachute
Posts: 38
Joined: Wed Jul 23, 2014 12:21 am

Re: Hikvision DS-2CD2032-I camera image glitches

Post by carcachute » Tue Oct 28, 2014 11:15 pm

I have two of the same camera running 5.2.0 firmware. I get the same "glitches" in two cases when I view the live stream on my computer:

1. If I have the bit rate set so high that the network is dropping packets (which looks like what you're seeing). I see issues above about 3.5mbps.
2. On initial connection, because the key frames seem to overrun VLC's receive buffer (VLC complains about it)

25 fps is very high, especially for ZoneMinder, which decodes every frame into a separate JPEG image file during events. Also, 1080p at that frame rate places a very high load on your system for motion detection. I record 24/7 (pulling directly from the camera feed to disk, not using ZoneMinder) and find 8-10 fps perfectly adequate. For a given max bit rate you trade fps for image quality.

Since the frame rate is set by the camera (i.e. it's not analog), you should leave the max FPS settings blank in ZoneMinder.

I have three cams, two of them Hik 2032s, set up the following way. For 24/7 recording:
  1. A script running from cron connects every 15 minutes and pulls raw video to a date-stamped file on the disk.
  2. Files older than a week get purged.
  3. Cam 1: 1080p @ 8fps, 2mbps max bit rate. Cam 2: 3MP @ 8fps, 3.5mbps max bit rate
Then, I have ZoneMinder monitoring the sub-streams only, not the main video stream:
  1. Sub streams are configured as Motion JPEG (MJPEG), 8 fps:
    • Cam 1 (1080p) is 704x480 (a weird aspect ratio a bit narrower than 16:9--the Hiks don't offer a 16:9 substream)
    • Cam 2 (3MP) is 640x480 (4:3).
  2. ZoneMinder channels are set up as:
    • HTTP, Simple
    • Host name user:password@cam.ip.address
    • Remote host path /Streaming/channels/1/preview
    • Target colorspace 24 bit color
    • Blending % is 12.5/12.5, which helps with lower frame rates.
Since ZoneMinder uses JPEG internally anyway, the MJPEG is more efficient to handle and streams easily over my Internet connection when I want to view events. Meanwhile, I have 24/7 recording in the background, outside of ZoneMinder, that places essentially no CPU load on the system. I have Samba installed on the server so that I can browse video files and play them quickly and efficiently. If an event is captured that warrants further investigation, I have a full week to pull the relevant 15-minute recording files off the server. I actually have two 1080p and one 3MP camera running on an Intel Atom computer I got for free and average about 15% CPU load that goes up to maybe 30% when all three cameras are alarmed. The raw video recording uses maybe 2% CPU and doesn't swamp the hard disk with activity either.

Another consideration is that because ZoneMinder stores individual JPEGs for each frame, image quality takes a hit because the compressed video stream is decoded and then re-compressed as a JPEG. Unless you have the JPEG quality set to 90% or above you'll notice the artifacts, which in my testing were enough to blur faces.

Finally, I had issues with ffmpeg going unstable (loading the system down) and not reconnecting if I took a camera offline even temporarily. This issue was known before 1.28 came out so it may have been fixed, but I'm still sticking with MJPEG for the motion detection for its simplicity.

ScottBouch
Posts: 43
Joined: Sat Oct 26, 2013 2:58 pm

Re: Hikvision DS-2CD2032-I camera image glitches

Post by ScottBouch » Wed Oct 29, 2014 4:03 pm

Thanks for the reply.

If I lower the bitrate at the camera, I assume this will limit the FPS..? however, ifI do as you have done, and set the camera FPS lower, it should be less of an issue.

I have just bought a proper 24 port 19" rack Gigabit PoE Ethernet switch (Netgear GS724TP-100), which may help matters somewhat, and also future-proof the house installation. My server is Gigabit compatible, and I'm making up Cat6 cables.

I'll try playing with the camera settings tonight based on your settings, as you said, I'd rather sacrifice FPS than resolution / .jpg quality, as there's not much point spending this time and money if all I can record is a faceless blur.

The lovely new switch should arrive on Friday.

Thanks again, Scott

carcachute
Posts: 38
Joined: Wed Jul 23, 2014 12:21 am

Re: Hikvision DS-2CD2032-I camera image glitches

Post by carcachute » Wed Oct 29, 2014 5:16 pm

ScottBouch wrote:If I lower the bitrate at the camera, I assume this will limit the FPS..? however, ifI do as you have done, and set the camera FPS lower, it should be less of an issue.
...
I'll try playing with the camera settings tonight based on your settings, as you said, I'd rather sacrifice FPS than resolution / .jpg quality, as there's not much point spending this time and money if all I can record is a faceless blur.
Hi Scott,

The bit rate and FPS are set independently in the camera, you could set the bit rate down to 256k and leave it at 25-30fps, and the result would be pretty blurry. This will require some iteration to find a combination that works for you. First find the lowest frame rate you are willing to tolerate (8-10fps is a good starting point), then adjust the bit rate up/down until important parts of the scene, like facial features, are clearly recognizable while moving. It is important to test this during motion because the motion takes bandwidth--a still scene can look razor sharp but a person walking across it will be a blurry mess if the bit rate is too low. Test at night, also, because your noise level will be higher if you're relying on the infrared, especially if you use the WDR feature.

I iterated on my settings and found that 2Mbps @ 1080p 8fps and 3.5Mbps @ 3MP 8fps work well for me with the video quality set to "Medium."

If your system is fast enough, use a ZoneMinder JPEG quality setting of 80-100% for event recording. You can always set a lower live view quality setting (I use 25%).

A good way to find the right camera settings quickly is to view the RTSP stream live in VLC player. VLC has a Media Information window that shows the bit rate in real time. Set the camera's bit rate up (to say 4M) and have someone walk in front of the camera so you can see what the bit rate would be unrestricted. Then tweak the bit rate and fps settings. The cam adjusts the feed instantly so you can see your results without reopening the stream.

ScottBouch
Posts: 43
Joined: Sat Oct 26, 2013 2:58 pm

Re: Hikvision DS-2CD2032-I camera image glitches

Post by ScottBouch » Wed Oct 29, 2014 9:43 pm

Thank you so much for the in-depth guidance, it's very much appreciated.

It's raining here tonight, so I've not got much chance to walk around in front of it, but I'll do as you say to fine-tune it over the coming weeks.

I've dropped it to 16FPS, and I've got to say, It's looking promising so far! Just recording rain drops, no glitches.

Proof will be in the pudding when I check tomorrow's recordings.

I'm looking forward to following your guidance to get the best out of it!

Thank you again, Scott.

carcachute
Posts: 38
Joined: Wed Jul 23, 2014 12:21 am

Re: Hikvision DS-2CD2032-I camera image glitches

Post by carcachute » Thu Oct 30, 2014 6:27 pm

I'm happy to help! I found a PDF from Hikvision with a handy table of recommended settings:

http://oversea-download.hikvision.com/u ... 20Rate.pdf

grndamgt4
Posts: 24
Joined: Tue Oct 13, 2009 5:05 pm

Re: Hikvision DS-2CD2032-I camera image glitches

Post by grndamgt4 » Sun Dec 07, 2014 4:47 pm

ScottBouch, did you get this resolved?
I've been having the same problem for awhile. Currently I have two of these with the below settings but still get the video irregularities on both. More so on the first one for some reason. No setting changes seem to fix the problem, however, the 2nd stream on the cameras have zero issues.

1: 1280*720p, medium video quality, fps 8, bitrate 2048
2: 1280*720p, highest video quality, fps 15, bitrate 3072

thanks

rangerbob
Posts: 61
Joined: Sat Jun 06, 2009 3:40 am

Re: Hikvision DS-2CD2032-I camera image glitches

Post by rangerbob » Wed Dec 24, 2014 5:46 pm

oh hey about to invest into some Hikvision cameras I am interested to know how you made out!

ScottBouch
Posts: 43
Joined: Sat Oct 26, 2013 2:58 pm

Re: Hikvision DS-2CD2032-I camera image glitches

Post by ScottBouch » Fri Jan 02, 2015 10:56 am

Hi,

Sorry for the delay, been busy with other things for a while..

The recorded images are much better than before, now I've lowered the frame rate, none of the glitchy "artefacts" as seen before. But I do have another issue..

This new issue involves playback of recorded events, the frames jumble up back and forth, and freeze up.. It could be that the images fro the camera are so large (I have it on the highest resolution setting). My next thing to try is to drop the resolution down, and see how I get on. I've managed to almost fill up my 500Gb hard drive with a month or so of Modect recordings, so lowering the resolution will also help me to record images for longer periods of time, till I start adding more cameras! Most recordings so far have been of spiders webs though. I think IO did start another thread on this subject a while back, best go check it out..

Cheers, Scott.

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests