Web Relay CLI Reference
shiloh-web-relay bridges the mixer’s UDP relay protocol to WebRTC. It subscribes to shiloh-mixer as three relay clients (one per feed: main, monitor, cue), encodes each feed to Opus at 128 kbps, and serves a WHEP endpoint so standard browsers can tune in with under 500 ms latency.
Usage
shiloh-web-relay [OPTIONS]
shiloh-web-relay has no subcommands — all configuration is via flags.
Flags
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--mixer |
host:port |
127.0.0.1:5005 |
No | Mixer UDP relay address |
--control |
host:port |
127.0.0.1:19997 |
No | Mixer control-plane address |
--http |
host:port |
127.0.0.1:8890 |
No | HTTP listen address for the WHEP endpoint |
--name-prefix |
string | web-relay |
No | Prefix for the three relay client names |
--announce-ip |
IP[,IP...] |
— | No | Public IP(s) to advertise as ICE Host candidates |
--ice-network-types |
type[,type...] |
all | No | ICE network types to enable |
Field notes
--mixer
The mixer’s UDP relay port. Must match broadcast_port in the mixer’s TOML config (default 5005). Because shiloh-web-relay typically runs on the same server as the mixer, the default 127.0.0.1:5005 works without changes.
--control
The mixer’s control-plane UDP port. Used by shiloh-web-relay to send set_relay_assignment datagrams that pin each of its three relay sessions to a specific feed (main, monitor, cue). Must match control_port in the mixer’s TOML config (default 19997). If shiloh-web-relay runs on a different machine than the mixer, set control_bind in the mixer TOML to the mixer’s WireGuard or LAN address and point --control at that address.
--http
The address and port on which shiloh-web-relay listens for WHEP HTTP requests. Browsers POST to http://<host>:8890/whep/<feed> (where <feed> is main, monitor, or cue) to initiate a WebRTC session. The default binds to loopback; change to 0.0.0.0:8890 or put a reverse proxy in front.
--name-prefix
Each of the three relay sessions registers with the mixer under a name derived from this prefix: <prefix>-main, <prefix>-monitor, <prefix>-cue. The names appear in the mixer web UI’s session list and are used as persistence keys for feed assignments. Use a distinct prefix if you run multiple web-relay instances against the same mixer.
--announce-ip
Comma-separated list of public IPv4 or IPv6 addresses to advertise as ICE Host candidates in the SDP offer. Use this when the server is behind 1:1 NAT or is multi-homed with only one internet-routable address. Without this flag, WebRTC gathers candidates from all local interfaces, which can cause ICE failure when the server’s public IP doesn’t match any local address.
Example: --announce-ip 203.0.113.42
Multiple addresses: --announce-ip 203.0.113.42,2001:db8::1
--ice-network-types
Comma-separated list of ICE network types to enable. Valid values: udp4, udp6, tcp4, tcp6. When unset, all four types are enabled. Pass udp4 to suppress IPv6 and TCP candidates, which simplifies ICE negotiation in environments where only UDP IPv4 is reachable.
Examples
Typical same-server deployment (defaults suffice, expose WHEP on all interfaces):
shiloh-web-relay --http 0.0.0.0:8890
Behind NAT with public IP announced:
shiloh-web-relay \
--http 0.0.0.0:8890 \
--announce-ip 203.0.113.42 \
--ice-network-types udp4
Remote web-relay on a separate machine:
shiloh-web-relay \
--mixer stg-srv001.bq.shilohbv.com:5005 \
--control stg-srv001.bq.shilohbv.com:19997 \
--http 0.0.0.0:8890 \
--name-prefix web-relay-remote \
--announce-ip 198.51.100.7 \
--ice-network-types udp4,udp6
WHEP endpoint paths
| Path | Feed |
|---|---|
POST /whep/main |
Main mix bus |
POST /whep/monitor |
Monitor bus |
POST /whep/cue |
Cue bus |
Clients initiate a WebRTC session by POSTing a WebRTC offer to the appropriate path. The response contains the SDP answer. Standard WHEP clients and compatible browsers handle the exchange automatically.
Encoding parameters
- Codec: Opus
- Sample rate: 48 kHz stereo
- Bitrate: 128 kbps VBR
- Frame size: 960 samples (20 ms)
- SDP parameters:
minptime=10;useinbandfec=1;stereo=1;sprop-stereo=1