RTMP relay server that receives a single stream and forwards to multiple platforms (Twitch, Facebook, Instagram, YouTube).
- main.rs: TCP listener, connection handling, config loading
- server.rs: RTMP handshake, server session setup (low-latency config)
- client.rs: Publisher connection handling, stream forwarding to platforms
- config.rs: TOML-based configuration parsing
- provider.rs: Stream key provider abstraction (OAuth2)
- error.rs: Centralized error types
- Listen on RTMP port (default 1945)
- Accept publisher connection
- Perform RTMP handshake
- Validate stream key
- Forward packets to all configured platforms (RTMP/RTMPS)
rtmp_addr = "0.0.0.0"
rtmp_port = 1945
stream_key = "your-key"
[[platform]]
url = "rtmp://live.twitch.tv/app"
key = "stream-key"
orientation = "horizontal" # or "vertical"reestream --config config.toml- Chunk size: 128 bytes
- ACK window: 256KB
- TCP_NODELAY enabled
- Input: RTMP
- Output: RTMP, RTMPS (via tokio-native-tls)
Pre-configured for: Twitch, Facebook, Instagram, YouTube. Extensible via config.
- rml_rtmp: RTMP protocol
- tokio: Async runtime
- reqwest: HTTP client (OAuth2)
- toml: Config parsing