As you develop applications that leverage Vidyo.io, you may want to include a feature for recording and distributing recordings for private or public viewing. By integrating the Media Bridge Docker image with your Vidyo application, you can record and distribute your Vidyo conferences.

What's Docker?

Docker is a robust software container platform you install on a dedicated server and use to run the Media Bridge image. The Media Bridge image provides record/playback functionality you might want to integrate with your Vidyo.io-based application. Docker provides the thorough resources and documentation you need to integrate basic or extensive Media Bridge features. See the Docker Overview here.

What's Media Bridge?

Media Bridge is a Docker image providing the functionality for recording and distributing video conferences accessed using your Vidyo.io-based application. From Docker, you pull the Media Bridge image, create a config file, create a container, drop in your config file, then start recording.

Before You Begin

Before you begin, ensure that your Linux server is configured with a running Docker Engine.

What you will need

Server platforms other than Ubuntu Linux 14.04+ have not been tested; they might not run smoothly or predictably in your deployment.


To set up your server with Media Bridge for managing video conference recordings, follow these steps:

        1. Install the Media Bridge docker image:
          docker pull vidyo/mediabridge
        2. Create a recording configuration file (see Recording Configuration File).
        3. Create a container from the Media Bridge image:
          docker run -d --name my_recorder vidyo/mediabridge
        4. Copy your config file to the container:
          docker cp config my_recorder:/opt/vidyo

Start a Recording

To start the container, enter:

docker exec -d my_recorder /opt/vidyo/record

Monitor a Recording

To monitor the recording, enter:

docker inspect -f {{.State.Running}} "my_recorder"

The container my_recorder returns false when the recording ends.

Stop a Recording

The recording stops automatically when the last participant leaves the room.

To force the recording to stop with a SIGINT call, enter:

docker exec my_recorder pkill -x --signal INT call

Retrieve a Recording

By default, the recording is saved to a file named recording.flv at this path:
/opt/vidyo folder

To retrieve the recording, enter:

docker cp my_recorder:/opt/vidyo/recording.flv $HOME

To override this, use the destination option described in the Recording Configuration File Options table below.


        • If you encounter a problem, retrieve the log file gw.log from the container at this path and use it to troubleshoot:
        • You can enable full logging by adding sdklog="-sdklog on" to the recording configuration file.

Resource Requirements

To ensure Media Bridge has sufficient resources for smooth HD streaming and playback, use the following CPU and memory reservation guidelines.

Resolution (fps) CPU [GHz] RAM [GB]
HD @ 720p (30) 2.2 2
HD @ 1080p (30) 4.0 4

Recording Configuration File

The recording configuration file is a plain text file with key-value pairs. Name this file config and place it at this path:

Each key-value pair must be on a separate line.

The key is separated from the value with an equal (=) sign only; do not use spaces in key-value pairs.

Use a # before comments; text appearing on a line after a # is ignored at runtime.

The following table describes the options available for the recording configuration file.

Recording Configuration File Options
Option Description
width The width of the video stream.
height The height of the video stream.
fps The frame rate of the video stream in frames per second.
kbps The bandwidth of the recording in kilo-bits per second.
layout Set to 1 for a basic layout, set to 2 for a presenter layout, where the current speaker occupies a larger tile than the rest, set to 3 for a film strip layout, where the current speaker occupies most of the screen and other participants appear in a film strip at the bottom.
maxParticipants The maximum number of participants to be rendered in the video stream.  Minimum is 1, maximum is 8.
overlay When set to 1, Media Bridge displays each participant's name as an overlay in the video stream.
presentationAllowed When set to 0, Media Bridge ignores presentations during the conference. When set to 1, Media Bridge records presentations instead of the main video streams.
presWidth The maximum width of the presentation stream.
presHeight The maximum height of the presentation stream.
presFps The frame rate of the presentation stream in frames per second.
presKbps The bandwidth used for the presentation stream in kilo-bits per second.

This can be a file name, a folder name (preceded by flv:) or an RTMP URI (preceded by rtmp:).

        • When you set this field to a folder name, Media Bridge randomly generates the file name. This directs the recording to a central storage location you mount inside the docker container (use the -v option).
        • When you set this field to an RTMP URI, Media Bridge streams the recording to that destination. No permanent record is stored.
resourceId The vidyo.io resource to connect to and record.
token The access token to the vidyo.io system.
host The vidyo.io host name to connect to. Make sure that this host name can be resolved inside your container. This can be done using the --add-host parameter when creating the container.

Sample Configuration File

#main video settings

#Presentation settings
presentationAllowed=1 #0 - ignore presentations 1 - replace main video with presentation

#vidyo.io connection info
Was this article helpful?
1 out of 1 found this helpful


Please sign in to leave a comment.