crybapp / aperture

Microservice that handles video and audio forwarding to clients
MIT License
19 stars 5 forks source link
cryb microservice video-forwarding

Cryb OSS

@cryb/aperture - Video/audio forwarding

GitHub contributors License Patreon Donate Chat on Discord

Docs

Info

@cryb/aperture is the microservice used to forward video and audio streams from @cryb/portal onto clients.

The ffmpeg command in @cryb/portal streams over TCP using the MPEGTS standard.

The HTTP endpoint used contains a parameter that contains a token that is signed on @cryb/portal which is used to route the stream onto WebSocket clients connected to the microservices' WebSocket instance.

Status

@cryb/aperture has been actively developed internally since September 2019, and is now open source as of October 2019.

Codebase

The codebase for @cryb/aperture is written in JavaScript, utilising Node.js. The WebSocket API uses the ws module. MongoDB is also used as the primary database.

Folder Structure

cryb/aperture/
└─── src # The core source code

First time setup

First, clone the @cryb/aperture repository locally:

git clone https://github.com/crybapp/aperture.git

Installation

The following services need to be installed for @cryb/aperture to function:

We recommend that you run the following services alongside @cryb/aperture, but it's not required.

You also need to install the required dependencies by running yarn.

Ensure that .env.example is either copied and renamed to .env, or is simply renamed to .env.

In this file, you'll need some values. Documentation is available in the .env.example file.

Running the app locally

Background Services

Make sure that you have installed MongoDB, and that it is running on port 27017.

The command to start MongoDB is mongod.

Starting @cryb/aperture

To run @cryb/aperture, run yarn start.

Questions / Issues

If you have an issues with @cryb/aperture, please either open a GitHub issue, contact a maintainer or join the Cryb Discord Server and ask in #tech-support.