Jump to content
BroncoBilly

Hacking my Hikvision cams to do what I want

Recommended Posts

I bought 8 Hikvision cameras for my place w/o thinking about it too hard. I have a security issue and wanted to record who might be snooping around my house. I also got the 7208 DVR (I think it's called) and after much swearing and configuring, got all 8 cameras working at the same time. Then I tried to turn on motion detection. Who wants to sift through 24 hours of footage each time?

 

here is really what I want to accomplish:

1. Record all the cameras, all the time, to looping recording footage. Set a file limit size, and it will over-write whatever is oldest.

2. ALSO have motion detection turned on. When motion is detected, save off a sub-clip of the always-recording files to a NEW "motion" file, or at the very least, save off the time/date/range of the motion detection as a text or binary file with reference to the always-being-recorded file.

3. I think Hikvision's motion detection STINKS by the way. shadows from things waving in the wind, and even a bee, will set off motion detection on my cameras, no matter what sensitivity I have them set at.

4. Record all the files to the hikvision DVR, but be able to access those files from elsewhere on my network, so I can have a *powerful* server analyze the footage of the supposed motion detection points and cull out the ones that are false, and send me mini videos of the ones that are actual intrusions. I want to be able to access the recorded video from my network computer.

5. I have all my cameras set up on schedules. but sometimes I want to stay up later than normal by a few hours, or go to bed earlier than normal. I want to be able to select from certain groups of cameras and tell them to "arm earlier than normal" or "arm later than normal" by a delta amount. This is totally not possible in hikvision's stuff.

6. likewise, I want to be able to leave the house for a while on a weekend and tell it to "arm until I turn you off", not on a schedule. This should be dead simple and be only a few clicks.

 

I don't know what my ability is to get into the hikvision camera or the DVR's OS and change what is going on in there. i'm a helluva programmer and can do it, but I don't know what their OS's allow, or how far I can go to hack in. what I do know is I don't want to do anything in assembly.

Share this post


Link to post
Share on other sites

Their API.

http://oversea-download.hikvision.com/uploadfile/Leaflet/ISAPI/HIKVISION%20ISAPI_2.0-IPMD%20Service.pdf

You can also download SDK from their website.

 

1. Record all the cameras, all the time, to looping recording footage. Set a file limit size, and it will over-write whatever is oldest.

You can do that.

2. ALSO have motion detection turned on. When motion is detected, save off a sub-clip of the always-recording files to a NEW "motion" file, or at the very least, save off the time/date/range of the motion detection as a text or binary file with reference to the always-being-recorded file.

Depending on your model, it allows setting of Main Stream for Continuous Recording and Event Stream for Event Triggered recording (Video Motion).

Motion event are logged in the log file. You can use API to retrieve.

3. I think Hikvision's motion detection STINKS by the way. shadows from things waving in the wind, and even a bee, will set off motion detection on my cameras, no matter what sensitivity I have them set at.

That's video motion for you. They just look at changes in the video stream and if they change beyond a certain parameter, it'll trigger. Same with all system.

What you are looking for is video analytics. Some brand/model support line crossing, directional crossing, loitering, missing object, left object etc.

These normally are priced at a premium. Some brand/model does include a couple of these analytics in the system as well. Accuracy varies. There are high end system that comes with more powerful analytics, all comes down to what's your budget for it.

4. Record all the files to the hikvision DVR, but be able to access those files from elsewhere on my network, so I can have a *powerful* server analyze the footage of the supposed motion detection points and cull out the ones that are false, and send me mini videos of the ones that are actual intrusions. I want to be able to access the recorded video from my network computer.

You can use the API to interact with the DVR. Alternatively, you can also mapped your NAS to your DVR and record to it. The files will be accessible through a mapped drive. You can then do the *powerful* server analysis you want on those clips.

5. I have all my cameras set up on schedules. but sometimes I want to stay up later than normal by a few hours, or go to bed earlier than normal. I want to be able to select from certain groups of cameras and tell them to "arm earlier than normal" or "arm later than normal" by a delta amount. This is totally not possible in hikvision's stuff.

It's possible, just not straight forward. Got to configure them independently. Alternatively, make use of the API to do your own customisation.

 

6. likewise, I want to be able to leave the house for a while on a weekend and tell it to "arm until I turn you off", not on a schedule. This should be dead simple and be only a few clicks.

I think you are confusing a CCTV system with a Security Alarm system. It can be done, just that the workflow is not design this way, so it takes more click to do it.

 

Generally speaking given the priced you paid, you are expecting too much out from the system. There are high end system that can do what you want and their engineers can basically customised the system and workflow to however you like it. But right now, it's kinda buying a Toyota and expect to get F1 performance out of it.

Share this post


Link to post
Share on other sites

people, not just myself, buy these cameras for a security system. not just for a cctv system. and the features I'm wanting aren't really all that fancy, with the exception of wanting better motion detection, they just haven't been implemented by Hikvision. I guess what I'm really asking is: Has somebody else already solved this issue and made a "better" security system? the only bits of hacking I was thinking I'd need to do on the cameras themselves is write a better motion detection routine, and when to turn on and off the camera's output stream (why bog down the network if the camera's not even supposed to be on). The hacking I thought I'd need to do on the DVR itself is monkeying with the schedules. But if, as you say, this is all possible from their SDK, that makes things a little different. Though it would be nice to be able to change this on the DVR.

 

I'll go read up more about this stuff. thanks!

Share this post


Link to post
Share on other sites

To Dary1733

 

You really went out of your way to answer the posters questions. That type of response is beyond what most people would do both in terms of time and knowledge shared. Nice job " title="Applause" />

Share this post


Link to post
Share on other sites

i quite agree, it was, for forums, a pretty detailed and outstanding reply.

 

I reckon a lot of people want these cheap, high quality cameras to protect their house as a security system. I wrote to HikVision and asked them about all these different features and told them their motion detection was really bad (a bee sets it off!). They wrote back (which was shocking in itself), and said, "We need to know where you bought your cameras before we'll talk to you". I told them, "I paid full price off Amazon Prime". They wrote back and said, "that is not an authorized dealer, we will not talk to you". I wrote to them and said, "I'm a principle engineer, in the computer vision department at Microsoft, we can make these cameras better at detecting motion and make a better product, just talk to me!" No answer. Go figure.

 

There are a lot of things people could want to do w/ these cameras, and hikvision's stuff is really, really primitive. If there isn't an already-hacked up suite I can install with a bunch of security features and scheduling built into it, boy the market sure is ripe for one. Sounds like this might be my new personal project.

 

Nice kudos, jerome.

Share this post


Link to post
Share on other sites

HIKVISION only support their customer if they bought it through authorised channel.

 

There's a lot of internet reseller that took the system that is meant for local (china) used and hacked the firmware (otherwise it's chinese menu only).

 

It's their way of doing business. A lot of other manufacturer, e.g. AVTECH, also don't support customer directly. You drop an email to them, they'll ask you look for the person/company you bought it from.

 

"I'm a principle engineer, in the computer vision department at Microsoft,

 

No wonder the video motion detection doesn't satisfy your need. You'll find a Toyota lousy if you had been used to a Porsche, although a Toyota did what it is built for.

From someone who had been using multiple brand over the last decade, the video motion is neither good, nor bad. It does what it's supposed to do.

What you are looking for is video analytic.

 

I do quite a bit of integration of the DVRs with our backend system to do management and status check, so first thing I look for in any system is always if the API/SDK are available.

Did some experiment with Azure Face Api to see if I can come up with some cheaper alternative to demographic analysis from images captured from the system. But the result wasn't that good, so dropped that. Variant too high for the dataset to be useful.

 

There are a lot of things people could want to do w/ these cameras, and hikvision's stuff is really, really primitive. If there isn't an already-hacked up suite I can install with a bunch of security features and scheduling built into it, boy the market sure is ripe for one. Sounds like this might be my new personal project.

There are. Just different range of products that you are looking for. https://www.milestonesys.com/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×