What is Cauldron? What are Brews?

SHARE

If you have been using Red5 Pro, you may have noticed the words “Cauldron” and “Brew” sprinkled throughout our documentation. It may sound sinister, but don’t worry – we haven’t started mixing potions! Although it sounds like magic, Cauldron and Brew are actually two aspects of Red5 Pro’s transcoding solutions. They empower developers and users… Continue reading What is Cauldron? What are Brews?

If you have been using Red5 Pro, you may have noticed the words “Cauldron” and “Brew” sprinkled throughout our documentation. It may sound sinister, but don’t worry – we haven’t started mixing potions! Although it sounds like magic, Cauldron and Brew are actually two aspects of Red5 Pro’s transcoding solutions. They empower developers and users to create the best quality interactive live video streams possible, in real-time.

Cauldron is our proprietary processor that allows the encoding and decoding of video and audio streams. In other words, it takes the video and audio that a user records and alters and compresses it so that it can be easily transferred over the internet. The video and audio is then presented to watchers in a viewable format. With Cauldron, all of this is done in real time.

Cauldron is written in native code, meaning it can be compiled directly into machine code without being translated to a language the processor understands. For Cauldron, which uses C and C++, the lack of “language barrier” means the encoding and decoding of video and audio streams are done as quickly as possible. It also means Cauldron works across platforms.

With Red5 Pro, a Cauldron node is also called a transcoder node. Transcoding is the process of taking compressed content (such as video and audio streams), decompressing it, and then altering it in some way before re-compressing it. Cauldron is commonly employed in use cases involving Adaptive Bitrate (ABR). With ABR, Cauldron transcoding allows the user to publish multiple bitrate variants of a single video stream. Then it delivers the best variant to each subscriber based on the subscriber’s available bandwidth. Instead of making subscribing difficult in low network conditions or having everyone subscribe to the lowest variant to accommodate the person with the least available bandwidth, this solution allows every subscriber to experience the highest quality content that their network can accommodate. Additionally, ABR allows for dynamic upgrading and downgrading of stream quality, so if a subscriber’s network conditions change they can continue subscribing to the stream at the new best variant for their conditions.

Cauldron transcoding supports snippets of code called Brews, which are written in C or C++. In a way, a Brew can be compared to a witch’s potion – it is a custom creation or feature that a developer makes that has a specific effect on the stream. That effect is applied during the transcoding process. More specifically, the developer writes code to intercept the stream after the decode process and then manipulate it as they see fit. After the stream has been altered in some way, it is then re-encoded and pushed through to be seen by subscribers. Using ABR as an example, after the stream has been intercepted, a Brew might split the stream into multiple bitrate variants for transcoding. Another example of a Brew is found in Red5 Pro’s public “face mask” demo project. This demo makes use of Cauldron’s real-time editing capabilities to draw a red box around faces as they show up in the stream. Alternatively, this example of live face detection integrates third-party facial detection libraries. Face detection puts a mask around subscribers’ faces and can be used in real time for face filters, backgrounds, and more.

The recent Red5 Pro Mixer tool is a perfect example of how Cauldron can be used to develop new solutions. The Mixer combines multiple live streams into a single one, creating one composite stream of all the audio and video. This can be used for a variety of exciting projects, from watch parties to virtual field trips to online gaming.

There are actually two different Mixer implementations supported by Red5 Pro: one that is based on a Cauldron Brew written in C++, and one on the Chromium Embedded Framework (CEF). The Brew-based Mixer takes the video frames from each of the live streams and merges them into a single frame, based on a predetermined layout. The resulting composition is then re-encoded and viewed as a single live stream. It takes a lot of resources to encode this final composite stream if using a fully software-based approach. To make the process as smooth as possible and preserve real-time communication, Red5 Pro worked with AMD to integrate hardware acceleration into the Brew-based Mixer solution. More details on the Brew-based Mixer (as well as the CEF-based Mixer) can be found in our post about Hardware-Based Mixing and Transcoding with AMD Xilinx.

Cauldron and Brews are the secrets to designing powerful interactive live video experiences. If you have any exciting new idea for live video or any questions about live video editing using Cauldron, feel free to reach out to us at info@red5.net or schedule a call.