No description
  • Go 96.6%
  • Nix 1.8%
  • Dockerfile 0.7%
  • Shell 0.6%
  • Makefile 0.3%
Find a file
2026-08-20 14:34:39 +02:00
.github gh: remove extra lint action 2026-08-20 14:34:39 +02:00
api api: limit api routes to GET requests 2026-08-20 11:52:05 +02:00
auth Merge branch 'master' into auth_metrics 2024-12-26 15:37:00 +01:00
cmd/srtbench bench: set fixed 3Mbits bandwidth, fix linter 2025-06-11 00:05:55 +02:00
config config: add default config test with example config 2026-08-20 11:52:05 +02:00
debian Release 1.4.0 2025-06-17 12:22:15 +02:00
docs add nix flake, fix lint 2026-08-20 12:15:33 +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 feat: parse h265/hevc stream to start relaying at GOP start 2025-08-04 12:28:05 +00:00
proto add streamid toString, better errors 2022-12-10 02:41:54 +01:00
relay relay: implement explicit buffer reuse 2026-08-20 14:03:39 +02:00
scripts improve docker usability, remove libsrt from ci, readme, docker 2026-08-20 11:52:05 +02:00
srt relay: implement explicit buffer reuse 2026-08-20 14:03:39 +02:00
stream use golanglint 2.x to satisfy newer versions of the lint action (#74) 2025-06-09 21:32:15 +02:00
.gitignore add nix flake, fix lint 2026-08-20 12:15:33 +02: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 better relay subscriber handling, drop unused backlog config 2026-08-20 01:28:41 +02:00
Dockerfile improve docker usability, remove libsrt from ci, readme, docker 2026-08-20 11:52:05 +02:00
flake.lock add nix flake, fix lint 2026-08-20 12:15:33 +02:00
flake.nix add nix flake, fix lint 2026-08-20 12:15:33 +02:00
go.mod replace srtgo with gosrt library 2026-08-20 01:27:50 +02:00
go.sum replace srtgo with gosrt library 2026-08-20 01:27:50 +02:00
LICENSE add license 2020-10-31 03:28:28 +01:00
main.go add nix flake, fix lint 2026-08-20 12:15:33 +02:00
Makefile add nix flake, fix lint 2026-08-20 12:15:33 +02:00
package.nix add nix flake, fix lint 2026-08-20 12:15:33 +02:00
README.md improve docker usability, remove libsrt from ci, readme, docker 2026-08-20 11:52:05 +02:00
VERSION add nix flake, fix lint 2026-08-20 12:15:33 +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 -p 1337:1337/udp --rm 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 --rm -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 golang 1.24 or higher

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