Brew Mixer Overview
Design
The Brew Mixer consists of three parts. The Brew Mixer WebApp serves a RESTful front end to create, modify, and destroy mixers. This is backed by the Node Mixer Plugin which makes up the service layer, interacting with the Red5Pro server to create and route stream data. And finally, the native layer where low-level data operations occur.
User applications control the mixer using a graph-based “RenderTree”, which allows modular video positioning and sizing as well as an audio mixing graph controlling the volume and panning of various sources.
WebApp
The Brew Mixer webapp serves the RESTful Brew Mixer API. Source code is provided as an example so that users can learn how to interact directly with the mixer using their own custom webapps, effectively bypassing or reimplementing the Brew Mixer API.
The WebApp also includes an example controller page, renderTreeController.html, which shows how to construct a RenderTree in JavaScript and make calls through the REST API. The page also allows users to edit the JSON RenderTree by hand to submit to the server, for easy experimentation.
Plugin
The NodeMixer Plugin is a Red5Pro Plugin making up the service layer. It handles the interaction with Red5Pro internals to begin Brew decoding of incoming streams and to coordinate the native layer with the outbound encoder, providing raw video and audio data.
Native
The native layer performs the low-level tasks of compositing video and mixing audio. It uses OpenCV for CPU-based image compositing.