WhepFrom
WHEP to RTP/RTSP tool
This tool has two working modes:
rtprtsp as client
Use whipinto for the reverse RTP/RTSP → WHIP direction, or follow the three-terminal loop.
Get it and prerequisites
Download a package or prebuilt binary using the installation guide, or build from this repository with cargo build --release --bin whepfrom. You need a reachable Live777 WHEP endpoint with an active publisher. RTP playback also needs a receiver such as ffplay or VLC; RTSP output needs a running RTSP server.
Bearer token
If live777.toml contains tokens = ["live777"] under [auth], pass the same token with -t:
whepfrom -t live777 -w http://127.0.0.1:7777/whep/777 \
-o rtp://127.0.0.1:9000 --sdp-file output.sdpDo not put tokens in URLs or commit them to shell history and configuration files intended for publication.
Options
| Option | Default | Description |
|---|---|---|
-o, --output | sdp://0.0.0.0:8555 | Output target: rtp:// / rtsp:// / sdp:// |
-w, --whep | required | WHEP endpoint URL |
--sdp-file | output.sdp | SDP filename to write (RTP mode) |
-t, --token | none | Bearer token for WHEP authentication |
--command | none | Run a command as child process |
--cable-url | none | Cable UDP bridge URL for DataChannel <-> UDP forwarding, e.g. udp://0.0.0.0:9001?host=127.0.0.1&port=9000 |
--cable-label | - | DataChannel label; joins the matching cable on the server |
--ice-server | none | ICE server for gathering, repeatable; format <url>[,<username>[,<credential>]]. Defaults to none — host candidates only (WHIP/WHEP endpoints advertise their own ICE servers via Link headers) |
-v | warn | Increase verbosity (-v info, -vv debug, -vvv trace) |
RTP
RTP mode need target and sdp file
whepfrom -o rtp://{target_ip}?video={video_port}&audio={audio_port} -w http://localhost:7777/whep/777 --sdp-file output.sdpwhepfrom -o rtp://localhost?video=9000&audio=9002 -w http://localhost:7777/whep/777 --sdp-file output.sdpThe URL's own port also works: video goes to it and audio to port + 2 (the RTP/AVP convention), while ?video=/?audio= still override per track:
whepfrom -o rtp://localhost:9000 -w http://localhost:7777/whep/777 --sdp-file output.sdpA multicast group as the host makes whepfrom a self-contained WHEP → multicast bridge — the tool-side counterpart of live777's rtp:// output target:
whepfrom -o rtp://230.1.1.1:1720 -w http://localhost:7777/whep/777 --sdp-file output.sdpMulticast options ride as query parameters: ?ttl=16 (IPv4 TTL / IPv6 hops, default 1) and ?interface=... (an IPv4 interface address for IPv4 groups, an interface index or name for IPv6 groups). Both are rejected for unicast destinations.
Use ffplay play
ffplay -protocol_whitelist rtp,file,udp -i output.sdpUse vlc play
vlc output.sdpRTSP from live777
The rtsp-listen (whepfrom as RTSP server) mode was removed. live777 has a built-in RTSP server for every stream — pull directly instead:
ffplay rtsp://localhost:8554/777Use transport tcp
ffplay rtsp://localhost:8554/777 -rtsp_transport tcpRTSP Client
whepfrom as a client, push the stream to an RTSP server
whepfrom -w http://localhost:7777/whep/777 -o rtsp://127.0.0.1:8554/777Use transport tcp
whepfrom -w http://localhost:7777/whep/test-rtsp -o rtsp://localhost:8554/test-rtsp?transport=tcpTroubleshooting
Run with -vv to include WebRTC and bridge diagnostics. Authentication, HTTP status codes and ICE failures are covered once in Troubleshooting; the rows below are specific to this tool.
| Symptom | What to check |
|---|---|
404 Not Found | Check the /whep/<stream> URL, stream name, server port and reverse-proxy path. With the default auto_create_whep=true, subscribing creates a missing stream, so the publisher does not need to create it first. If automatic creation is disabled globally or for this stream, make sure the publisher or an administrator creates it before subscribing. |
| Connected, but no media | Confirm the stream has an active publisher and negotiated tracks. For RTP, use -o rtp://127.0.0.1:9000 --sdp-file output.sdp (not a bare SDP output), open that SDP in the receiver, and check UDP firewall/port rules. |