Skip to content
Moe edited this page Mar 5, 2017 · 133 revisions

What is CCTV? What is Open Source?

CCTV stands for Closed-Circuit Television. It's also a fancy way of saying DVR, Digital Video Recorder. It's a system in which multiple cameras can be watched or recorded for either personal or business circumstances.

Open Source means it is open for editing to your liking... and the way its being made. It will not be difficult. There are no arbitrary libraries, like mootools, to get in your way. Be aware that open source does not mean free. Shinobi just happens to be free as well.

What is the aim of Shinobi

So far in Free Open Source CCTV there is no reliable solution. Shinobi aims to fill that void.

Shinobi can be used as a Baby Monitor, Construction Site Montage viewer, Store Camera DVR, and much more. I suppose the simplest way of saying it is As Magento is to eCommerce, Shinobi is to CCTV.

A Quick Look at Shinobi YouTube

Noted Aspects

  • Records IP Cameras and Local Cameras
  • Streams by WebSocket
  • Save to WebM and MP4
  • Other formats will be added after codec choices are less confusing.
  • API
  • Get videos
  • Get monitors
  • Change monitor modes : Disabled, Watch, Record
  • Embedding streams

Why make this? Other solutions already exist.

I want to help people. If a community is born from it, I welcome it but it is not my goal to make friends. I believe becoming friends is part of the result. I want to make a platform where the regular person could get their security system setup with ease. Where protecting one's assets isn't costly or painful. In short : I want to make a great CCTV platform.

I needed something to start with and my brother suggested ZoneMinder... so I took to the internet for more answers.

ZoneMinder was the primary choice but it proved unstable. A few reasons are mentioned below. Solutions such as ispyconnect are not relevant as they have a cost for using their platform.

Before getting onto the list i want to say Thank You ZoneMinder. With you I learned PHP and JavaScript. You were a major reason why I opened documentation on programming languages for many years. As much as there are critical statements about zoneminder, there is praise that can't be found in words. For without you there may be no Shinobi.

  • MJPEG streams are beyond unusable in modern applications.

    • Essentially with MJPEG you are opening a new stream everytime you create an image with an MJPEG url. Even if you remove this element it will continue to eat resources from the server and client. Only way to deal with it currently is through an iframe or popup. Neither of which should be considered acceptable.
    • Shinobi addresses this with WebSocket streams. As frames are captured by FFMPEG they are base64 encoded and sent to the client.
    • As of January 2017 : Shinobi can output HLS (m3u8) and MJPEG also.
  • JPEG Storage is just a terrible idea.

    • Saving each frame as a separate file in JPEG format can have a seriously detrmental effect on storage space and the hardware itself. Hardware is more likely to fail under the stress of continuously saving frames to storage.
    • Shinobi saves to WebM and MP4 files. While MP4 takes a fair amount of space.. its level of CPU usage during encoding for H.264 streams is just amazing.
  • Using languages that are not needed.

    • You'll find that ZoneMinder uses multiple languages to achieve very small results. This probably just because of the time it was written in... but with that said all the devs currently working on it should have addressed these issues and removed unecessary steps, languages, and files. ZoneMinder uses Perl, PHP, JavaScript, C, HTML, CSS, MySQL, and probably more.
    • Shinobi uses JavaScript, HTML, CSS, and MySQL. Simple right? It should be.
  • Using outdated or troublesome libraries.

  • Mootools, need I say more? and the API is done with an added library called CakePHP... just.. why? Both libraries should have been replaced already with faster and modern solutions.

  • Outdated methods

  • Continuously hammering the database is not a good idea. It should already have had websockets added and interval refreshes removed completely before 2014.

  • For every camera Zoneminder creates a new process every time a viewer opens a stream. 1 Stream = 1 Process. Shinobi uses 1 process for all viewers. If electricity has a cost then it literally costs less to use Shinobi

  • General Issues

  • ZoneMinder tends to crash a lot.

  • The interface is horrible. More than 10 years already. The interface should look like a modern application. Changing the background to black isn't good enough.

  • No Audio recording (seriously?)

  • No ability to restream

  • Cannot create videos from Websocket, mainly because it has no websocket feature added.

    • Shinobi has this feature to use internet-enabled smartphones as dashcams.

What builds the arrogance to say such things?

Well, you can be sure that I didn't always think so poorly of zoneminder. Honestly it was thought of highly in my life. It had credibility in my mind before I even used it. ZoneMinder, the name alone had power. Such high praise from the internet and my own brother.

As much as ZoneMinder was godly among CCTV applications. It only had this praise because no other solutions existed. If they did they were a mere sliver in zoneminder's shadow. At first I tried to fix the issues zoneminder was having by myself as I was using the video branch which was not updated with the rest of zoneminder. I needed mp4 recording and a part of me thought they would get that in within a reasonable amount of time, I was wrong.

The more I worked on zoneminder, the more bitter I became. Issues getting ignored for more than 1 year should have been the hint when I first started.

By them taking so long to do decent updates, address issues, and still taking donations it implies "Don't like ZM? Let's see you do better". In my mind this is a level of arrogance that must be brought to it's knees.

Neither ZoneMinder devs or I are competing with each other. Frankly it's not a possibility, Our goals are much too different. They are looking to make a community, make friends. I am looking to make a great CCTV platform, I believe becoming friends is a part of that result. ZoneMinder in it for the short run and Shinobi in it for the long run. We would not find each other in the same race.

Supported Systems

How to Install and Run

Author

Moe Alam

Follow me on Twitter

Find me on Slack! :)

Help make Shinobi the best Open Source CCTV platform.

If you like Shinobi please check out some ways you can help support Shinobi.

Credits

If you wish to use this software for commercial purposes please consider donating :) If not.. including my name would be nice.

    Shinobi
    Copyright (C) 2016-2025 Moe Alam, moeiscool

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    # Libraries Used
    
    vbox.css (the framework that does the vertical panel layout) - I honestly don't know who made this, i found it in a zip.
    jQuery - http://jquery.com/
    Socket.io - http://socket.io/
    Bootstrap - http://getbootstrap.com/
    Moment.js - http://momentjs.com/
    Livestamp.js - https://mattbradley.github.io/livestampjs/
    Font Awesome - http://fontawesome.io/
    Node.js - https://nodejs.org
    MySQL - https://www.mysql.com/
    NPM: mysql - https://www.npmjs.com/package/mysql
    NPM: crypto - https://www.npmjs.com/package/crypto
    NPM: express - http://expressjs.com/
    NPM: request - https://www.npmjs.com/package/request
    NPM: connection-tester - https://www.npmjs.com/package/connection-tester
    image : shinobi.jpg - the background image on the front page is not mine, there were no credits where i found it. it just looks cool :D
    
    and maybe a few others.
Clone this wiki locally