Code Monkey home page Code Monkey logo

hiki's Introduction

Hiki - CCTV Network Video Recorder

Background

Running a software CCTV NVR (Network Video Recorder) involves a lot of moving parts.

Hiki is different, it designed around the KISS principle. It relies on the IP camera for the complicated stuff (motion detection, video configuration) and instead provides reliable recording of network video stream to disk.

Benefits

  • Motion detection is handled by the camera, reducing workload on the server.
  • No transcoding of video is required, the native format is streamed to disk.
  • Keeps control over your files, doesn't lock them away in a proprietary format.

Features

  • 24x7 continuous recording (With configurable duration per file)
  • Simultaneous motion event driven recording
  • Scheduled image recording
  • Motion event driven image recording
  • Ability to trigger external commands on completion of motion event recording (For post processing or media library update)
  • Thumbnail files can be generated alongside the video file to allow programs such as Plex to display correctly.

Requirements

  • A Linux server or a system running docker
  • One or more recent Hikvision IPTV cameras
  • nodejs
  • openRTSP - Used to record the video streams
  • curl - Used to download images
  • node-hikvision-api - Used to receive motion events from the camera

Installation

There are two routes to installation, the first is a manual install following these steps:

  • Install nodejs
  • Install openRTSP (livemedia-utils package)
  • clone the repo (git clone https://github.com/refinitive/hiki.git)
  • download node modules (npm install)
  • Customise config.yml for cameras and output directory (copy from .sample)
  • Run node hiki.js

Or install using docker and let it sort out the pre-reqs:

  • Install docker
  • clone the repo git clone https://github.com/refinitive/hiki.git
  • Customise config.yml to match your cameras
  • execute ./docker_build.sh
  • execute ./docker_run.sh (Ctrl+C to exit)
  • execute ./docker_daemon.sh to run in the background

Using Hiki

Hiki will store output files in a logical hierarchy depending on the date, camera and type of recording. Each day is represented by its own directory under which will be each camera and type of recording. As such it is easy to apply different retention logic based on the kind of recording (continuous vs motion detect)

Output files will be written to ./cctv by default with the hiearachy created at run-time. It is possible for hiki to execute a command once the recording is complete for use cases such as add the recording to Plex or push the recording up to the cloud.

Example output:

The following shows the output from a camera called 'driveway' that is using 24x7 recording. The additional jpg files are created to allow thumbnail to be displayed in the media library:

cctv/2017/05/18/driveway_constant/driveway_constant_20170518_2156_01.jpg
cctv/2017/05/18/driveway_constant/driveway_constant_20170518_2156_01-fanart.jpg

The following files were created by a motion event, triggered by the Hikvision API. The recording will start on detection of motion and then complete a configurable number of seconds after stops being detected:

cctv/2017/05/18/driveway_motion/driveway_motion_20170518_2156_01.mp4
cctv/2017/05/18/driveway_motion/driveway_motion_20170518_2156_01.jpg

Supported cameras

Make Model Resolution Issues
Hikvision DS-2CD2142FWD-IS (Amazon) 2688x1520 @20fps None

Contact

Email to [email protected]

hiki's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.