35
0
Fork 0
Mainly on GitHub! TOOD: Add Github CI which pushes to Foregejo (or migrate issues over here and close GH repo) https://github.com/voc/srtrelay
  • Go 97%
  • Dockerfile 1.8%
  • Shell 1%
  • Makefile 0.2%
Find a file
2025-06-09 22:27:29 +02:00
.github build with backports 2025-06-09 22:27:29 +02:00
api Merge branch 'master' into auth_metrics 2024-12-26 15:37:00 +01:00
auth Merge branch 'master' into auth_metrics 2024-12-26 15:37:00 +01:00
config use golanglint 2.x to satisfy newer versions of the lint action (#74) 2025-06-09 21:32:15 +02:00
debian Amend Debian changelog 2025-06-09 22:15:23 +02:00
docs update README, add instructions on how to run from docker 2021-08-09 01:39:10 +02:00
format add configurable packetsize, reuse relay buffers 2023-11-06 23:39:46 +01:00
internal/metrics Instrument auth package 2024-12-25 21:16:13 +01:00
mpegts use golanglint 2.x to satisfy newer versions of the lint action (#74) 2025-06-09 21:32:15 +02:00
proto add streamid toString, better errors 2022-12-10 02:41:54 +01:00
relay Instrument auth package 2024-12-25 21:16:13 +01:00
scripts ci: try to fix dependency install 2024-06-11 12:39:12 +02:00
srt remove comments 2024-12-26 15:27:50 +01:00
stream use golanglint 2.x to satisfy newer versions of the lint action (#74) 2025-06-09 21:32:15 +02:00
.gitignore No jetbrains files 2024-12-26 15:27:12 +01:00
.golangci.yml use golanglint 2.x to satisfy newer versions of the lint action (#74) 2025-06-09 21:32:15 +02:00
config.toml.example remove listenBacklog option because it doesn't exist 2023-11-17 16:27:08 +01:00
Dockerfile Update Ecosystem (#48) 2024-12-24 10:27:34 +01:00
go.mod Bump gotest.tools/v3 from 3.5.1 to 3.5.2 (#59) 2025-06-09 20:24:23 +02:00
go.sum Bump gotest.tools/v3 from 3.5.1 to 3.5.2 (#59) 2025-06-09 20:24:23 +02:00
LICENSE add license 2020-10-31 03:28:28 +01:00
main.go Update build (#47) 2024-12-24 01:15:53 +01:00
Makefile Add metrics endpoint (#46) 2024-12-24 01:11:17 +01:00
README.md Document usage with docker-compose 2022-04-11 12:42:54 +02:00

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.toml:/home/srtrelay/config.toml ghcr.io/voc/srtrelay/srtrelay:latest

Run with docker-compose

In your docker-compose.yml:

   srtrelay:
     image: ghcr.io/voc/srtrelay/srtrelay:latest
     restart: always
     container_name: srtrelay
     volumes:
       - ./srtrelay-config.toml:/home/srtrelay/config.toml
     ports:
       - "44560:1337/udp"

This will forward port 44560 to internal port 1337 in the container. Importantly, forwarding UDP is required. It will also copy a srtrelay-config.toml file in the same directory into the container to use as config.toml

Start the server with the usual

docker-compose up -d

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