Streaming with WHIP, WHEP and HLS
MediaSFU rooms can take media from outside tools and send it back out, all controlled from your server over HTTP:
| I want to… | Use | Guide |
|---|---|---|
| Go live from OBS or a hardware encoder into a room | WHIP ingest | Stream from OBS |
| Watch a stream in a low-latency WebRTC player | WHEP playback | Play with WHEP |
| Reach a large audience on any device | HLS broadcast | Broadcast with HLS |
| Run a whole call without the SDK | WHIP + WHEP per participant | Participants over HTTP |
How it fits together
- A room is always the starting point. Create one with the
rooms endpoint
or an SDK, and keep its
meetingID. - Your server creates a streaming resource for that room: an external session (WHIP), a playback (WHEP) or a broadcast (HLS).
- MediaSFU returns a URL and a short-lived token for that resource. Hand them to the encoder or player; they expire, so create a new resource each time you go live.
- Delete the resource when the stream ends.
Every request uses the same authentication as rooms:
Authorization: Bearer <api-username>:<api-key>. Make these calls from your
server, never from a browser or mobile app.
A WHIP stream appears in the room as a participant, so people in the room see and hear it like anyone else, and it can feed an HLS broadcast.
Choosing WHEP or HLS for viewers
| WHEP | HLS | |
|---|---|---|
| Latency | Sub-second | A few seconds |
| Audience size | Small, interactive audiences (one connection per viewer) | Large audiences; put a CDN in front |
| Player | A WHEP-capable WebRTC player | Any HLS player, including Safari and hls.js |
Availability
WHIP, WHEP and HLS are covered in these guides. RTMP, RTMPS and SRT are not enabled by default; contact support@mediasfu.com with your use case to discuss access. OBS Studio 30 and later publishes over WHIP, so OBS does not need RTMP.
For every route, field and cleanup rule in one place, see the streaming HTTP reference.