Modern software for manipulating live video streams from IP cameras.
Explanation of this project.
Digital video introduction (technical background 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.
- Type
make
- Report any issues
- Install AWS CLI and authenticate
- Run
cd cloudformation && ./deploy-stack.sh
- (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 thejanus_encrypted_ssl_key_pem
value injanus_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)
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.
If this sounds like an interesting project that you would like to help build, please drop us a line: cloudcam@int80.biz.
This design has gone through many incarnations and revisions. Some previous attempts were: