1

I have a Hikvision IP camera (DS-2CD2332-I: 3MP, IR, h.264 stream) mounted on the front of my house, and I'd like to record its stream, so that it can be later watched - for example, if there is a crime committed.

I've done some research on this, and all the answers I find point towards applications that do selective recording via motion detection, and transcode the video too. I've tested some applications (iSpy, and another which I forget) and found the recorded quality to be poor, sometimes unusable. Perhaps some/all of the motion detection applications can disable the motion detection and transcoding, but I have a suspicion (perhaps unfounded) that the motion detection and transcoding are adding a lot of complexity, and that's getting in the way of the recording reliability.

Question: What is the simplest way of configuring a system that will:

  1. Write the camera's video stream direct from network to disk, as mp4 file
  2. Every hour, end one file, and start a new one (date as filename)
  3. When total size in folder exceeds nGB (e.g. 150) delete the oldest file
  4. Have an uptime > 99%

Back of the envelope math says that a 2 Mbps stream is 22GB per day, so I could store 1 week of files on 150 GB.

Bonus points if it's open source, and python, so I can tinker with it. Double bonus if it can run on low power machine / raspberryPi

Thanks

1
  • 1
    You seem to be "asking for a product, service or learning material recommendation,", but that is explicitly off-topic.
    – Ron Maupin
    Jan 28, 2016 at 2:38

1 Answer 1

1

I have a suspicion (perhaps unfounded) that the motion detection and transcoding are adding a lot of complexity, and that's getting in the way of the recording reliability.

Hardware will always limit "reliability" and while motion detection is extremely unlikely too cause much of an issue, conversion from one format to another is almost always going to be hardware intensive.

As to the solution that would best fit the bill for your requirements, FFMpeg (here are some recommended Windows builds of FFMpeg) and some scripting/automation is probably your best answer.

FFMpeg is native to Linux, can potentially write the network streams to .mp4, can be started and stopped programmatically with scripting and supports a wide range of device including those that export H264.

Back of the envelope math says that a 2 Mbps stream is 22GB per day[...]

This article claims 15GB a day if the IR is recorded as black and white. It also seems to provide a good starting point for recording IP cameras on Linux with FFMpeg.

1
  • Thanks. I've used ffmpeg before, and have considered this option. It's a little more coding right now that I'd like, but perhaps there is an OS option out there that someone else has started. I'll take another look.
    – tom
    Jan 28, 2016 at 22:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .