SRT Live Server (sls) is a low latency streaming server that is using SRT (Secure Reliable Transport). This fork includes a secure REST API with authentication, SQLite database storage, and rate limiting for production use.
- SRT Protocol Support: Low latency streaming with SRT
- Secure REST API: Authentication with API keys and rate limiting
- SQLite Database: Persistent storage for stream IDs and configuration
- Access Logging: Complete audit trail of API usage
- Docker Support: Easy deployment with docker-compose
- Dynamic end-to-end Latency: Latency can be determined by the client
- Clone the repository:
git clone https://github.com/OpenIRL/srt-live-server.git
cd srt-live-server- Start with docker-compose:
docker-compose up -d- Check the logs for the admin API key:
docker-compose logs | grep "admin API key"You'll see something like:
Generated default admin API key: AbCdEfGhIjKlMnOpQrStUvWxYz123456
IMPORTANT: Save this key securely. It will not be shown again.
4000/udp: Publisher port (SRT input)4001/udp: Player port (SRT output)8080/tcp: HTTP API port
See API.md for complete API documentation.
- Add a stream mapping:
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"publisher":"studio","player":"live"}' \
http://hostname:8080/api/stream-ids- List all streams:
curl -H "Authorization: Bearer YOUR_API_KEY" \
http://hostname:8080/api/stream-ids- Get stream statistics:
curl http://hostname:8080/stats/livesrt://hostname:4001?streamid=publisher_id
srt://hostname:4000?streamid=player_id
- Change Default API Key: The default admin key should be changed immediately
- Use HTTPS: In production, use a reverse proxy with SSL/TLS
- Network Security: Restrict API access to trusted networks
- Regular Backups: Backup the SQLite database regularly
- Monitor Logs: Check access logs for suspicious activity
Create publisher and player id using the api:
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"publisher":"publisher_id","player":"player_id"}' \
http://hostname:8080/api/stream-idsffmpeg -re -f lavfi -i testsrc2=size=640x360:rate=25 -f lavfi -i sine=frequency=1000:sample_rate=48000 -c:v libx264 -preset ultrafast -tune zerolatency -c:a aac -f mpegts "srt://hostname:4001?streamid=publisher_id"
Receive it with OBS or VLC: srt://hostname:4000?streamid=player_id
For issues and feature requests, please use the GitHub issue tracker.
This project is licensed under the MIT License - see the LICENSE file for details.