WebRTC publishing over WHIP¶
WHIP sends video and audio from an encoder to Agora over WebRTC. This guide uses the stream studio; after publishing, you can watch it over WHEP.
Prepare the stream¶
- In Streams, create or open
studio. On the Inputs tab, add a Publish input and save. - On the Layout tab, find the streamer running the stream. WHIP needs a reachable HTTP(S) address for this streamer.
- Set an allowed publishing token in
auth.publish_tokensthrough central, or allow publishing through the authorization backend. Give the sender this token. Configure publishing and viewing permissions separately.
Check network access¶
You can leave the streamer WebRTC ports empty: the service selects one free UDP port. For networks that restrict inbound ports, set a fixed WebRTC port such as 5005 and allow UDP access from the encoder and viewers. An HTTPS proxy alone does not carry UDP media.
Behind NAT, ICE candidates must announce an address reachable by the client. Automatic port selection does not add a public address or TURN. See the Sapsan network reference.
Connect the sender¶
In OBS Studio, open Settings → Stream and set:
- Service:
WHIP. - Server:
https://streamer.example.com/streaming/whip/studio. - Bearer Token: the publishing token.
See these fields in the OBS guide. Replace streamer.example.com with the receiving streamer address. If a proxy terminates HTTPS, it must forward /streaming/whip/ to this streamer.
Select H.264 video and Opus audio, then start streaming. AV1 is also supported if the sender and viewers support it. Use a single video encoding; the server does not build an ABR ladder from WHIP simulcast.
Verify publishing¶
Open the stream card: the Publish input should receive data, and the media information should show a video track and, when audio is sent, Opus. Then connect a WHEP player.
A stream accepts one active WHIP publisher. Stop the current broadcast before switching senders. The sender must reconnect after disconnection; inputs follow the shared failover rules.
Troubleshoot connection failures¶
| Symptom | Check |
|---|---|
403 |
Publishing token and permission. |
404 |
Stream name, running state and selected streamer. |
409 |
The Publish input is saved and available; another sender may already occupy it. |
400 or 415 |
Sender SDP and codecs: WHIP needs H.264/AV1 video and Opus audio. |
501 on PATCH |
Disable Trickle ICE/ICE restart: the service accepts complete initial SDP. |
| HTTP connects but no media arrives | UDP reachability and the streamer ICE address. |