Shinobi is an Open Source CCTV software written in Node.JS. Designed with multiple account system, Streams by WebSocket, and Save to WebM. Currently it is being crafted for IP Cameras, not local.
Shinobi can record IP Cameras and Local Cameras.
ZoneMinder was the first 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.
-
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
orpopup
. 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.
- 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
-
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.
- Written in a simple structure.
camera.js
andweb
folder. - Streams are transferred through
WebSocket
. DOM element is animg
tag. - Any websocket enabled browser can support the image stream (including mobile)
- Can save to WebM or MP4 (Your version of FFMPEG must have libvpx and libx264)
- No Mootools (yes, you can shake my hand later)
- Calendar view for Events
- Fix Pipe error that occasionally occurs.
(appears to be caused by JPEG stream emit or pipe into ffmpeg, MJPEG is not affected)
- this will be addressed by segmenting feature. - Save events with blank frames and force real duration instead of based on frame count.
- better mobile support.
If you like Shinobi please consider donating.
Moe Alam https://twitter.com/moe_alam Find me on Discord! :)
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.