Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voc/srtrelay
SRT relay server for distributing media streams to multiple clients.
https://github.com/voc/srtrelay
ffmpeg multiplexer relay srt streaming
Last synced: 3 months ago
JSON representation
SRT relay server for distributing media streams to multiple clients.
- Host: GitHub
- URL: https://github.com/voc/srtrelay
- Owner: voc
- License: mit
- Created: 2020-10-01T22:48:56.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-11T10:58:09.000Z (5 months ago)
- Last Synced: 2024-06-18T22:55:14.109Z (5 months ago)
- Topics: ffmpeg, multiplexer, relay, srt, streaming
- Language: Go
- Homepage:
- Size: 200 KB
- Stars: 132
- Watchers: 14
- Forks: 37
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Contributing: docs/Contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# srtrelay ![CI](https://github.com/voc/srtrelay/workflows/CI/badge.svg)
Streaming-Relay for the SRT-protocolUse at your own risk.
## Quick start
Run with docker (**Note:** nightly image not recommended for production)
```bash
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](config.toml.example)
```bash
# 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`:
```yaml
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.tomlStart the server with the usual
```bash
docker-compose up -d
```## Build with docker
You will need atleast docker-20.10```bash
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**
- you will need to [build libsrt yourself](https://github.com/Haivision/srt#build-on-linux)**Debian 10**:
- use libsrt-openssl-dev from the [voc repository](https://c3voc.de/wiki/projects:vocbian)
- or [build it yourself](https://github.com/Haivision/srt#build-on-linux)**Gentoo**:
- emerge net-libs/srt### Build
```bash
go build -o srtrelay# run srtrelay
./srtrelay
```## Usage
### Commandline Flags
```bash
# List available flags
./srtrelay -h
```### Configuration
Please take a look at [config.toml.example](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](docs/API.md) for more information about the API.## Contributing
See [docs/Contributing.md](docs/Contributing.md)## Credits
Thanks go to
- Haivision for [srt](https://github.com/Haivision/srt) and [srtgo](https://github.com/Haivision/srtgo)
- Edward Wu for [srt-live-server](https://github.com/Edward-Wu/srt-live-server)
- Quentin Renard for [go-astits](https://github.com/asticode/go-astits)