Your First Flow
This guide walks you through creating a simple SRT-to-RTP media flow.
What is a Flow?
Section titled “What is a Flow?”A flow in bilbycast is a single input fanning out to one or more outputs. The input receives media (e.g., from an SRT source) and each output independently delivers it to a destination.
Input (SRT) ──► broadcast channel ──► Output 1 (RTP) ──► Output 2 (UDP) ──► Output 3 (RTMP)Slow outputs drop packets rather than causing backpressure — they never affect the input or other outputs.
Step 1: Create the Config
Section titled “Step 1: Create the Config”Create a config.json with an SRT listener input and an RTP output:
{ "version": 1, "server": { "listen_addr": "0.0.0.0", "listen_port": 8080 }, "monitor": { "listen_addr": "0.0.0.0", "listen_port": 9090 }, "flows": [ { "id": "my-first-flow", "name": "SRT to RTP", "enabled": true, "input": { "type": "srt", "mode": "listener", "local_addr": "0.0.0.0:9000", "latency_ms": 120 }, "outputs": [ { "type": "rtp", "id": "rtp-out", "name": "RTP Output", "dest_addr": "127.0.0.1:5004" } ] } ]}Step 2: Start the Edge
Section titled “Step 2: Start the Edge”./target/release/bilbycast-edge --config config.jsonThe edge starts listening for SRT connections on port 9000.
Step 3: Send Media
Section titled “Step 3: Send Media”Use any SRT-capable tool to send media to the edge:
# Using srt-live-transmitsrt-live-transmit udp://source:1234 srt://edge-ip:9000
# Using ffmpeg (if SRT support is compiled in)ffmpeg -re -i input.mp4 -c copy -f mpegts srt://edge-ip:9000Step 4: Receive the Output
Section titled “Step 4: Receive the Output”The RTP output is sent to 127.0.0.1:5004. View it with:
# Using ffplayffplay -i rtp://127.0.0.1:5004
# Using VLCvlc rtp://127.0.0.1:5004Step 5: Monitor
Section titled “Step 5: Monitor”- REST API:
http://localhost:8080/api/v1/stats - Monitor Dashboard:
http://localhost:9090 - Prometheus Metrics:
http://localhost:9090/metrics
Adding More Outputs
Section titled “Adding More Outputs”Add multiple outputs to the same flow. Each subscribes independently to the broadcast channel:
{ "outputs": [ { "type": "rtp", "id": "rtp-out", "name": "RTP Multicast", "dest_addr": "239.1.1.1:5004" }, { "type": "srt", "id": "srt-out", "name": "SRT Forward", "mode": "caller", "remote_addr": "destination:9001", "latency_ms": 120 }, { "type": "rtmp", "id": "rtmp-out", "name": "YouTube Live", "url": "rtmp://a.rtmp.youtube.com/live2", "stream_key": "your-stream-key" } ]}Next Steps
Section titled “Next Steps”- Supported Protocols — full protocol reference
- Configuration — complete config file documentation
- API Reference — REST API endpoints