/srtrelay

SRT relay server for distributing media streams to multiple clients.

Primary LanguageGoMIT LicenseMIT

srtrelay CI

Streaming-Relay for the SRT-protocol

Use at your own risk.

Quick start

Run with docker (Note: nightly image not recommended for production)

docker run ghcr.io/voc/srtrelay/srtrelay:latest

# start publisher
ffmpeg -i test.mp4 -c copy -f mpegts srt://localhost:1337?streamid=publish/test

# start subscriber
ffplay -fflags nobuffer srt://localhost:1337?streamid=play/test

Start docker with custom config. See config.toml.example

# provide your own config from the local directory
docker run -v $(pwd)/config.yml:/home/srtrelay/config.yml ghcr.io/voc/srtrelay/srtrelay:latest

Build with docker

You will need atleast docker-20.10

docker build -t srtrelay .

# run srtrelay
docker run --rm -it srtrelay

Build without docker

Install Dependencies

Requires >=libsrt-1.4.2, golang and a C compiler

Ubuntu

Debian 10:

Gentoo:

  • emerge net-libs/srt

Build

go build -o srtrelay

# run srtrelay
./srtrelay

Usage

Commandline Flags

# List available flags
./srtrelay -h

Configuration

Please take a look at config.toml.example to learn more about configuring srtrelay.

The configuration file can be placed under config.toml in the current working directory, at /etc/srtrelay/config.toml or at a custom location specified via the -config flag.

API

See docs/API.md for more information about the API.

Contributing

See docs/Contributing.md

Credits

Thanks go to