Coder Social home page Coder Social logo

mrgcohen / cloudcam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from revmischa/cloudcam

1.0 1.0 0.0 1.78 MB

IP camera surveillance management system using AWS IoT with support for Axis cameras.

License: Other

Makefile 2.04% Python 35.86% Shell 1.25% C++ 1.87% C 17.03% Rust 16.45% Dockerfile 0.30% HTML 0.81% CSS 0.61% TypeScript 23.11% JavaScript 0.68%

cloudcam's Introduction

Modern software for manipulating live video streams from IP cameras.

Based on Serverless, AWS Lambda and AWS IoT.

Project Info

Currently working on embedded linux support, including for running on Axis cameras with the ACAP SDK. Support for other devices is planned. The backend services will be provided by AWS IoT, Lambda and S3. This is based on open source as much as humanly possible. Contributions are encouraged and welcome. There is full support for embedded linux. Video streaming will be done with gstreamer.

Building Client:

  • Install Dependencies:
    • Debian/Ubuntu: sudo apt install libgstreamer1.0-dev python3-pip yarn
    • macOS: brew install gstreamer libsoup json-glib sqlite3
  • Type make

Deploy:

  1. Install AWS CLI and authenticate
  2. Install serverless
  3. Run yarn to install serverless plugins
  4. Run sls deploy to deploy lambdas and CloudFormation stack

Frontend:

cd ui
yarn
yarn start

(optional) Run cd cloudformation && ./encrypt-ssl-key.sh to encrypt the SSL private key (certs/$domain/server.key) for the Janus gateway subdomain with the key managed by the AWS KMS and replace the janus_encrypted_ssl_key_pem value in janus_scale_lightsail.py with the result (note: this must be run as either as AWS root user or user specified in JANUS_KMS_KEY_USER_ARN in step 2)

Architecture

There are several distinct modules that must interact to permit live streaming video to flow from an input device to a client using a mobile app or web browser.

A video source generates video and possibly audio from either an IP camera attached to a network, a local camera (built-in camera or USB webcam), or a file. While we'd all love to use a patent-unencumbered video codec that works on all platforms this is not possible so we must use h264.

Once the streaming source has video codec data it must create a streaming session and mountpoint on a video server and then begin transmitting the video and/or audio codec data via RTP over UDP. This video server can use WebSockets or HTTP for stream session creation on the back-end, and can deliver it via WebRTC to client devices. This server with two faces as it were is known as Janus. As long as the streaming source is generating h264 video (all current-generation IP cameras do) it can be passed through untouched all the way to the client without any transcoding. This means there is a very low CPU requirement for the intermediate software. WebRTC is a new standard for live media streaming in web browsers and mobile applications and it is already supported in most browsers with the notable exception of Safari, though Apple has announced WebRTC support will be forthcoming soon.

By using gstreamer, Janus, and WebRTC we can construct a fully open-source, standards-compliant free live video streaming service. Incorporating our Axis camera app using their (propriatary, unfortunately) ACAP SDK with the AWS IoT API and Lambda allows us to run the application services and signalling entirely in the cloud without servers or even virtual machine instances. The Janus streaming media server can be set up separately including on premises for organizations that do not want their sensitive video leaving their network.

Contributing

If this sounds like an interesting project that you would like to help build, please drop us a line: [email protected].

Related projects

Old projects

This design has gone through many incarnations and revisions. Some previous attempts were:

cloudcam's People

Contributors

revmischa avatar someone--else avatar

Stargazers

 avatar

Watchers

 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.