← Back to the blog
Guides #whip

Sub-second publishing with WHIP

WHIP is WebRTC ingest over a single HTTP request — the lowest-latency way to push into StreamHub. When to use it over RTMP, and how to create a WHIP endpoint.

2 min read
Leer en español

WHIP: WebRTC ingest, HTTP simple

WHIP (WebRTC-HTTP Ingestion Protocol) lets an encoder publish a WebRTC stream by making a single HTTP request. You get WebRTC's sub-second latency on the ingest side, without the signaling complexity — which makes it the lowest-latency way to get media into StreamHub.

Where RTMP adds a few seconds of buffering, WHIP stays sub-second end-to-end when paired with the WebRTC player. That is the difference between "live" and "interactive".

RTMP or WHIP?

  • RTMP — universal encoder support (OBS, ffmpeg, hardware), a few seconds of latency, transcoding on by default. Best for broadcast.
  • WHIP — sub-second latency, needs a WHIP-capable publisher, transcoding off by default. Best for interactive and real-time.

Create a WHIP ingress

curl -s -X POST $BASE/apps/live/ingress -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"inputType":"whip","room":"realtime"}'

The response includes the WHIP endpoint URL. Point a WHIP publisher at it — a growing number of encoders, browser publishers and the OBS WHIP output support this natively. Because WHIP defaults to transcoding off, enable it explicitly (or opt the app in) if you also want adaptive/HLS output from a WHIP source:

curl -s -X POST $BASE/apps/live/ingress -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"inputType":"whip","room":"realtime","enableTranscoding":true}'

Watch it with matching latency

To preserve the low latency all the way to the viewer, pair WHIP ingest with the WebRTC player, not HLS. Mint a subscribe token:

curl -s -X POST $BASE/apps/live/tokens -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"room":"realtime","canPublish":false,"canSubscribe":true}'
# → data.playUrl (WebRTC) — sub-second glass-to-glass

Using HLS on a WHIP source works, but the HLS buffer throws away the latency advantage you came for.

When WHIP shines

Reach for WHIP when the delay itself is the product: live auctions, remote production, telepresence, drone/robotics feeds, anything where an operator reacts to what they see. For a one-way broadcast to a big audience, RTMP-in / HLS-out is simpler and scales further. StreamHub supports both from the same app, so you can even mix them per room.