Service: BBC Brave - EyevinnOSC/community GitHub Wiki

Brave

Brave (serviceId bbc-brave) is the BBC's open-source basic real-time audio/video editor and live video mixer. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance. License: Apache-2.0.

What it can do

  • Receive live video and/or audio (RTMP, HLS, WebRTC, test patterns), manipulate it and send it elsewhere.
  • Forward RTMP from one place to another.
  • Mix or switch between two or more inputs in real time and add basic graphics.
  • Output to RTMP or HLS destinations.
  • Be controlled through a browser-based editor at the instance root or through a REST API.

Creating an instance

Create the instance with create-service-instance using serviceId: "bbc-brave" and a config object. The instance name must be alphanumeric and at most 20 characters. Brave has no dependencies on other OSC services. A STUN server URL is needed for WebRTC inputs and outputs; the public Google STUN server (stun:stun.l.google.com:19302) works for testing, while a dedicated TURN server is recommended for production.

{ "name": "mixer", "StunServer": "stun:stun.l.google.com:19302" }

Wait for the instance to become ready with wait-for-service-ready (or get-instance-status), then use describe-service-instance to read the instance URL.

Options

Option Required Type Meaning
name Yes string Name of the instance. Letters, digits and underscore only (^\w+$), at most 20 characters.
StunServer No string STUN server URL for WebRTC inputs/outputs, for example stun:stun.l.google.com:19302.
TurnServer No string TURN server URL for NAT traversal.

The same OSC CLI form is also available: osc create bbc-brave mixer -o StunServer="stun:stun.l.google.com:19302".

Using the instance

Open https://{instance-url}/ in a browser to reach the Brave web editor, where you can add inputs, configure mixers and set up outputs. Brave also exposes a REST API at https://{instance-url}/api/v1.

Add an RTMP input (the response includes the RTMP ingest URL to push your stream to):

curl -X POST https://{instance-url}/api/v1/inputs \
  -H 'Content-Type: application/json' \
  -d '{"type": "rtmp"}'

Add an HLS output:

curl -X POST https://{instance-url}/api/v1/outputs \
  -H 'Content-Type: application/json' \
  -d '{"type": "hls"}'

List inputs and outputs:

curl https://{instance-url}/api/v1/inputs
curl https://{instance-url}/api/v1/outputs

OSC puts an authentication gate in front of instance URLs other than /, so API calls from outside may need a service access token.

Resources