CCTV surveillance using Raspberry Pi

CCTV surveillance using Raspberry Pi


For Security purposes, we usually need to capture every motion in specified areas. To fulfill this requirement, CCTV cameras were introduced a few years ago.

However, this brought along some challenges such as the following:

  • The ordinary security cameras run continuously, in turn recording everything
  • They need to be monitored 24 hours a day
  • Another major problem with ordinary security cameras is that you need to fast-forward and rewind a lot to find a particular moment / situation


Vmoksha’s SolutionRaspberry-Pi
To overcome these issues, Motion activated cameras were introduced. These cameras do not record unless a specified minimum size moves within their range. It stores only potentially relevant video which makes easy to review a particular event.


Vmoksha has implemented CCTV Surveillance System by using Raspberry Pi. This system records every motion in a specified area, which can be monitored from any web browser. The camera connected to the Raspberry Pi module detects any kind of motion and capture images. The Raspberry Pi stores the images locally, converts them into a video and uploads that video into Cloud storage such as Dropbox


Block Diagram

Block Diagram

Components of the Raspberry Pi Module

Components of the Raspberry Pi Module


Hardware Components

Raspberry Pi: It is a credit-card sized low-cost computer that plugs into a TV or computer monitor and uses a standard keyboard and mouse.

Raspberry Pi Camera Module: It captures high-definition video and still photographs. It is also used to capture slow-motion, time-lapse and other videos.

Power Supply: Raspberry Pi has micro USB connectors to connect the power supply. The requirement for the power supply is 5V and 700mA although it is recommended to use a 1.2A power supply especially if you will be connecting wireless devices or a Wi-Fi dongle.

SD Card: The Raspberry Pi Operating System is loaded and executed from an SD card.


Software Components

Raspbian: To run the Raspberry Pi, we need an operating system which is a set of basic programs and utilities. Raspberry Pi foundation recommends installing the Raspbian operating system, a version of Debian Linux that optimizes and uses the Raspberry Pi hardware. This comes with over 35,000 packages, which makes it more than a pure OS. It is precompiled software bundled in an appropriate format for easy installation on your Raspberry Pi. It is still under active development with emphasis on improving the performance and stability of many Debian packages.

Motion Software: This program monitors the video signal from one or more cameras and detects motion. It is able to detect if a significant part of the picture has changed. It is basically made for Linux operating system and is a command line based tool whose output can be PPM, JPEG files or MPEG video sequences. It is the perfect tool to monitor your property because it saves only those images that are really required.


How does it work?

A Raspbian image is installed on the SD card and connected to the Raspberry Pi module. The motion software program has also to be installed after this.

The motion software program continuously compares every image with a previously captured image and detects motion. If it recognizes any difference between two images, it starts capturing image and stores those images on an SD card. When motion stops, it converts those captured images to a video.

The Raspberry Pi will then upload the converted videos to the Dropbox cloud storage and delete the uploaded video from SD card. For this uploading and deleting process, we have used Python code.


Challenges and Solutions

While implementing this project, we faced some challenges. Read on to know how we faced our challenges with smart solutions:


Challenge Solution


Initially, the converted videos were not uploading to Dropbox due to a proxy issue We provided full permission to Dropbox


Once the video is upload, it was showing up an incorrect time, hence we could not recognize the latest video We used timestamp in the Python code which attaches time to that video file while uploading


After a series of challenges and solutions, Vmoksha finally succeeded in implementing CCTV Surveillance by Using Raspberry PI.


My sincere thanks to Mehter M Muzzamil, who had also contributed and helped me in launching CCTV surveillance using Raspberry Pi module.


About Gadepalli Manikanta Kamal

Gadepalli Kamal is a software developer at Vmoksha Technologies who has in-depth experience in advanced Java. He is passionate about researching and implementing new technologies and completed several projects successfully applying the emerging technologies. Besides staying updated on new trends, he loves painting and writing.

5 comments on “CCTV surveillance using Raspberry Pi

  1. MohanRaj

    Can you share the python code? I also wish to use in our office. please post or give a link to reach the code. Thanks in advance.

  2. gmail support

    It is providing the details of a CCTV camera using a Raspberry Pi actually. It includes the working principles, features and the advantages as well. The user may have a problem to access a CCTV through Raspberry Pi, they definitely get an idea regarding the details of it.

  3. Gapps

    Excellent solution. Thanks for sharing Supreeth :)

  4. Alsec

    Cool stuff! Thanks for the share.

  5. câble

    After looking over a number of the blog posts on your website, I seriously like your technique of writing a blog.

    I added it to my bookmark site list and will be checking back soon. Please check out my web site too and
    let me know what you think.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>