Hikvision Cameras' Notify Surveillance Center
Is it possible to offload motion detection to my Hikvision cameras and use their "Notify Surveillance Center" to trigger a MD event recording in SecuritySpy as can be done with some other NVR software? That would be awesome!
Comments
It looks like others are able to pick up on this network activity:
https://www.vueville.com/home-security/cctv/ip-cameras/set-up-push-notifications-hikvision-ip-camera-nvr/
https://github.com/mezz64/home-assistant.io/blob/7e940121cc689c94cd32395b4bf36af5757e1b0c/source/_components/binary_sensor.hikvision.markdown
See page 176 of http://oversea-download.hikvision.com/uploadfile/Leaflet/ISAPI/HIKVISION ISAPI_2.0-IPMD Service.pdf
Under Preferences -> Cameras -> Setup in SecuritySpy you will see some new triggering options, including "camera motion detection" - enable this.
Then, in the camera, enable motion detection and define an area to detect motion in. You'll also have to set up a schedule in the camera for when it performs this (all blue indicates it will do this all the time).
You can leave the "Video motion detection" option in SecuritySpy on or off as you choose (it operates independently). Make sure that Motion Capture (and/or Actions) is armed in SecuritySpy for the trigger to actually do anything.
You don't need to use the "Notify Surveillance Center" option - SecuritySpy doesn't use this.
Please confirm this works as expected.
On first tests, this does seem to work a little bit. The motion detection trips SS's motion and records, but I notice some odd things with the recorded video. (i have "decompress incoming video frames only when required turned on). At first I saw some recordings with full frame rate and then in the middle of one it cut down to what appears to be just the I Frame interval. So the recorded footage is not really usable, my I Frame is 20, 15fps.
If you could get this working correctly this will be a MASSIVE feature for SS. This allows me to run 4mp cameras with 0.0% cpu usage! (unless I am live viewing things)
This image shows three cameras. From top to bottom.
1. 4mp cam, normal
2. 4mp cam, in 1080p, normal
3. 4mp cam, using new feature... 0.0% CPU!!!
http://i1282.photobucket.com/albums/a522/MikeWesner/Other/Screen Shot 2017-06-05 at 12.07.04 PM_zpslqux19wn.png
So, thats the downside of this. I have to interact with hikvision software rather than ss. I continue to get i-frame rate video from this.
I have 6 of these 4mp cams, and I would love to run them at a higher res (rather than 1080 and 15fps), but it just takes the cpu a bit much on this machine. I am using a mid 2010 mac pro with 2 x 2.4ghz quad core xeon, 24gb DDR3 1066mhz ram, AMD radeon HD 7950 3gb. (i dont know if that video card is helping me out at all or not, its an upgrade from a few years ago).
40% of a core is quite a bit for 4mp at 15fps. The network is all gigabit and seems to handle all this stuff well.
I have 7 Hikvision cameras, haven't had the chance to try the new SecuritySpy beta yet, but just to comment on your post.
There is no need whatsoever to use the dreadful ivms-4200 software. All Hikvision cameras have a pretty good webinterface where you can configure all aspects of the cameras.
Your remark about iframe and frame rate... I'm not sure what you are trying to achieve.
Every person is different ofcourse, but why would you want a huge resolution and a high framerate ? For me personally, I use 6fps, and have set my iframe to the same interval.
My cameras are 3mp and I have set them to stream at 720p.
For security purposes this is more than enough. I've never seen a burglar who runs faster than 1/6th of a second and doesn't get noticed by a camera...
When watching a movie, I'd love a big resolution and a fluid framerate, but for a security camera ? As long as everything is clear and recognizable, all is good.
BTW motion blur has nothing to do with framerate, but hikvisions don't have a shutterspeed control, so no matter how high you set your resolution and framerate, you will not get any picture that is free of motion blur.
Anyway, I don't think that SecuritySpy has any influence on how you set your camera. SS just receives a trigger from the camera that it has detected motion, and SS then starts to record (or whatever you have set up inside SecuritySpy).
Your camera is just streaming video at the resolution and settings that you have set inside your camera, and SecuritySpy receives this stream.
My point about the recorded video being I-Frame rate... i am just saying that the cameras are putting out 15fps, but when I use SS in the new mode, the recorded video is only recording those I frames (it seems like)... the video is not picking up all the frames that are being sent. When I switch back to normal SS motion detection, i get full 15fps video. I assume this is not intended.
I agree I may need to tone it down on the res and frame rate.. I already did technically, These are 4mp cameras that can do 20fps! and I am using them at 2.1 (1080p).
It is nice that in expert mode you can have night and day motion settings be separate.
If that bug is fixed, does that mean that SS will have to decode the video frames to just write it to disk? Or will I be able to record full frame rate to disk with little to no CPU usage?
At this point this setup is pretty nice, other than I think the motion detection on SS filters out bugs a bit better than the HikVision on camera version. But having all these cameras running with motion and using NO CPU is just fantastic. (This machine does many other things besides just security spy, it runs Indigo (Insteon home automation), plex, various security/monitoring services, logging, etc.
On my cameras, I can set different regions (boxes) each with its own sensitivity and percentage/coverage parameter. I can set separate day and night settings for each region on each camera. Now, that all sounds great, and during the day I have it tuned pretty perfectly. I can exclude areas with trees/shadow/etc and yet still catch just about everything. I caught a rabbit running across my driveway yesterday!
However, bugs... at night... just a nightmare for the hikvision detection. I have the sensitivity way down and its still just constant falses. Now, what I need to probably go for next is 1. off camera IR and 2. off camera PIR sensors. But for now I may just have to live with tons of falses, or use continuous mode (Which is fine, but I don't want to re-encode to a lower frame rate, so its going to eat disk.. 1TB should last a few weeks?)
Anyway.. thanks for the quick updates and new HikVision features, this really makes for a great setup.
Bugs are a difficult problem with cameras with built-in IR lighting. You'll get far better results using a separate IR light instead of the camera's IR light. Also, these separate IR lights are typically a lot brighter and will cover a much larger area than built-in camera IR lights, so you get other benefits too.
If you want to use SecuritySpy's motion detection while not using much CPU, there is another way: add the camera's low-resolution substream as a separate camera in SecuritySpy, and turn on motion detection for this. Then you set this to this trigger the main stream when motion is detected. This way, only the low-res substream needs to be decompressed. The downside is that it does use up an additional camera slot in your SecuritySpy license, but you might want to do this for the one or two cameras that are most affected by false-positives caused by bugs, at least until you sort out the lighting.
@Ben I do think I spoke too soon about the video. I have discovered an issue.
edit: it may be only on my DS-2CD2442FWD-IW cameras.
If I have camera windows up, this problem does not exist.
Without the windows, the resulting m4v files seem to be somewhat corrupt. The mac finder preview doesn't really play them at all, i see the progress bar moving but the image is frozen. If I open in VLC, I get a grey glitched video for a second and then the timeline jumps by minutes, 5, 11 minutes, that might depend on that last recording. Then it plays the video correctly for the motion captured clip. The SS web remote viewing can't play them well either.
Looks like I have to leave the preview windows up still to use this. I am not sure why I didn't notice this yesterday during testing. I tried 1920x1080, 2304x1296, 2688x1520 and at different frame rates and such, but these were the same settings I had during yesterdays tests.
I just had a motion capture with the preview window open and its still corrupt video. This latest file wont even play in VLC. Just shows a single frame, wont play.
Any suggestions @ben on how to debug this?