Giter Club home page Giter Club logo

picctv's Introduction

piCCTV

Turn Raspberry pi into a CCTV

Features

  1. Start recording on capture of movement.
  2. It uses ring buffer to include recordings
  3. Automatically merge records into 1 file on capture of continuous movements.
  4. Keep its recording folder(/home/pi/cctv_capture) under 1GB by removing oldest files.

Prerequisites

  1. Raspberry compatible camera connected to its camera connector. Other interfaces like GPIO is not tested but may possible somehow...
  2. sudo pip install numpy
  3. sudo apt-get install python-picamera details
  4. sudo raspi-config and enable camera.
  5. Git installed system that you'll use as a surveillance monitor. On Windows, git bin folder needs to be registered in environmental variable path. The getall script uses the scp.exe in it.

How to use

  1. git clone https://github.com/chidea/piCCTV.git && cd piCCTV
  2. sudo python cctv.py for one-time run
  3. sudo sh install.sh to install it as system service. In this way, you can stop, start, restart the service with sudo service cctv [restart/start/stop] later.
  4. On your monitoring machine, do the same on line number 1 and python getall.py <address of your raspberry pi> [file name or filter] If you're using Windows for it and do not want python to be installed, use getall <address of your raspberry pi> [file name or filter] instead (utilizing getall.bat).

File name filter example for getall.bat or scp

  • Simply leave it blank or * to get all videos captured.
  • "2015\ 05\ 18*" to get all videos captured on May 18th, 2015.

How to play recorded .264 videos

ffplay can be used to play it directly or convert it with ffmpeg.

MQTT version

You can be noticed for CCTV status messages by MQTT. It's utilizing paho python client.

sudo pip install paho-mqtt
sudo python mqtt_cctv.py <topic> [broker address] [id] [pw]

Sending a message record to topic /control/<topic> will record for several seconds as same as capturing a motion.

If you want to install this version as service, after installing the service as instruction above, overwrite the file /home/pi/cctv.py with it and restart the service.

mv mqtt_cctv.py /home/pi/cctv.py && sudo service cctv restart

Feel free to take a look at cctv.py and apply the CV on it.

picctv's People

Contributors

chidea 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.