@cryb/aperture - Video/audio forwarding
@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.
@cryb/aperture has been actively developed internally since September 2019, and is now open source as of October 2019.
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.
cryb/aperture/
└─── src # The core source code
First, clone the @cryb/aperture repository locally:
git clone https://github.com/crybapp/aperture.git
The following services need to be installed for @cryb/aperture to function:
- MongoDB
We recommend that you run the following services alongside @cryb/aperture, but it's not required.
@cryb/portal
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.
Make sure that you have installed MongoDB, and that it is running on port 27017.
The command to start MongoDB is mongod.
To run @cryb/aperture, run yarn start.
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.

