Home

Awesome

RTMP relay v1.0

Build Status Build Status

Relays RTMP streams to multiple endpoints.

Usage

RTMP relay uses yaml-cpp submodule. The following command has to be run after cloning the RTMP relay:

$ git submodule update --init

To compile the RTMP relay, just run "make" in the root directory. You can pass these arguments to rtmp_relay (located in the bin directory):

Docker build

Check out submodules the same way as for a normal build, then run docker-compose build. This will result in a local image named evo-rtmp-relay:latest.

Configuration

RTMP relay configuration files are YAML-based. It must start with servers array. Each server has following attributes:

applicationName can have the following tokens:

streamName name can have the following tokens:

Optionally you can add a web status page with "statusPage" object, which has the following attribute:

Status page can be accessed in the following addresses:

To configure logging, you can add "log" object to the config file. It has the following attributes

Example configuration:

log:
    level: 4
    syslogIdent: relay
    syslogFacility: "LOG_LOCAL3"
statusPage:
    address: "0.0.0.0:80"
servers:
  - endpoints:
      - addresses: [ "0.0.0.0:13004" ]
        type: "host"
        direction: "input"
        applicationName: "app/name"
        video: true
        audio: true
      - addresses: [ "52.19.130.93:1935" ]
        type: "client"
        direction: "output"
        applicationName: "app/name"
        streamName: "stream_name"
        video: true
        audio: true
        pingInterval: 60.0
      - addresses: [ "127.0.0.1:13005" ]
        type: "client"
        direction: "output"
        applicationName: "app/name"
        streamName: "{streamName}_2"
        video: true
        audio: true
        pingInterval: 60.0
        connectionTimeout: 5.0
        reconnectInterval: 5.0
        reconnectCount: 3