Try it free

← BlogProtocols7 min read

WHIP and WHEP explained: sub-second live video over plain HTTP

WebRTC has delivered sub-second video in browsers for over a decade, yet for most of that time every streaming server invented its own way to set a call up. WHIP and WHEP replace all of that with one HTTP request each way.

The problem: WebRTC never defined signalling

WebRTC specifies how media flows (ICE to find a path, DTLS to agree keys, SRTP to carry audio and video) but deliberately leaves out signalling: how the two sides swap their session descriptions (SDP) in the first place. Video calling apps use a WebSocket protocol of their own, which is fine when you write both ends.

Broadcast is different. An encoder from one vendor must talk to a server from another, and a player must talk to whatever CDN carries the stream. Without a standard handshake, hardware encoders and OBS stuck with RTMP, and WebRTC stayed a browser-only curiosity for live production.

WHIP: ingest in one POST

The WebRTC-HTTP Ingestion Protocol (published by the IETF as RFC 9725) reduces signalling to a resource you create and delete:

The WHIP handshake The encoder posts an SDP offer to the WHIP endpoint and receives 201 Created with an SDP answer and a Location header. ICE and DTLS then run directly between encoder and media server, SRTP media flows, and a DELETE on the Location ends the session. Encoder / browser WHIP endpoint POST /whip/endpoint · Content-Type: application/sdp Authorization: Bearer <token> · body: SDP offer 201 Created · body: SDP answer Location: /whip/resource/abc123 ICE connectivity checks · DTLS handshake SRTP audio + video (UDP, sub-second) DELETE /whip/resource/abc123 200 OK · session over
WHIP's whole control plane: one POST to start, one DELETE to stop. Everything in between is standard WebRTC.
  1. The client builds an SDP offer listing its codecs and ICE credentials, and POSTs it with Content-Type: application/sdp. A bearer token in the Authorization header says who may publish.
  2. The server answers 201 Created with its SDP answer in the body and a Location header naming the session it just made.
  3. ICE and DTLS run as in any WebRTC call, then media flows as SRTP over UDP.
  4. The client ends the session with DELETE on that location.

That is the entire protocol. Optional extras exist, such as PATCH with trickle-ICE fragments to add candidates late and ICE restarts, but a working publisher needs only the two requests above.

WHEP: the same idea for playback

The WebRTC-HTTP Egress Protocol (an IETF working-group draft at the time of writing) mirrors WHIP for viewers: a player POSTs an offer that only receives, the server answers, and media flows the other way. A player needs no SDK, just RTCPeerConnection and fetch:

const pc = new RTCPeerConnection();
pc.addTransceiver('video', { direction: 'recvonly' });
pc.addTransceiver('audio', { direction: 'recvonly' });
pc.ontrack = (e) => (video.srcObject = e.streams[0]);

await pc.setLocalDescription(await pc.createOffer());
const res = await fetch(whepUrl, {
  method: 'POST',
  headers: { 'Content-Type': 'application/sdp' },
  body: pc.localDescription.sdp,
});
await pc.setRemoteDescription({ type: 'answer', sdp: await res.text() });

Why it matters: latency

Segment-based delivery (HLS, DASH) waits for whole chunks of video to be written, listed and fetched before a player shows them. WebRTC sends each frame as soon as it is encoded. The difference is an order of magnitude:

Typical glass-to-glass latency by delivery method Typical ranges: WebRTC with WHIP and WHEP, 0.2 to 0.8 seconds. Low-latency HLS, 2 to 5 seconds. RTMP to a player, 2 to 5 seconds. Standard HLS, 6 to 30 seconds. 0 s 5 s 10 s 15 s 20 s+ WebRTC (WHIP/WHEP) Low-latency HLS RTMP player Standard HLS 0.2–0.8 s 2–5 s 2–5 s 6–30 s
Typical ranges seen in practice; your numbers depend on encoder settings, segment length, network and player buffers.

Sub-second delay is what makes interaction work: auctions, sport with live betting, a teacher answering a question, a guest joining a show, a camera operator steering by the picture.

What it costs

Who speaks it today

OBS Studio publishes over WHIP since version 30. FFmpeg gained a whip muxer in its 8.x releases. Every modern browser can do both directions with the few lines of code above. On the server side, WHIP and WHEP are fast becoming the expected way in and out of any low-latency platform.

In creekX: going live from a browser tab, a phone or OBS over WHIP, and watching with sub-second delay over WHEP, are built in. See going live from your browser and watch links and embeds.

Frequently asked questions

What is WHIP?

The WebRTC-HTTP Ingestion Protocol, IETF RFC 9725: a client publishes WebRTC media by POSTing an SDP offer to an HTTP endpoint, receives the SDP answer in a 201 Created response, and ends the session with DELETE.

What is WHEP?

The WebRTC-HTTP Egress Protocol: the playback counterpart of WHIP, where a viewer POSTs a receive-only SDP offer and gets the stream back over WebRTC.

What latency does WHIP and WHEP give?

Typically well under a second from camera to screen, compared with 2 to 5 seconds for low-latency HLS.