Live streaming
Bring a live stream into a room from OBS or another encoder, or send a whole call out to YouTube, Facebook or any RTMP server. Both need prepaid credit (see Pricing).
Stream in from OBS (WHIP)
The stream joins the room as one more participant with a camera and mic, so every app can already show it. The delay is under a second.
1. Create an ingest point on your backend. You can reuse it for every stream:
curl -X POST https://api.appsocom.dev/rooms/town-hall/ingress \
-H "Authorization: Bearer $APPSOCOM_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"Main stage"}'
# → {"ingressId":"in_…","whipUrl":"https://api.appsocom.dev/whip/t/…","streamKey":"sk_…"}The streamKey is shown once.
2. In OBS: go to Settings → Stream, choose Service WHIP, set Server to whipUrl and Bearer Token to streamKey, and press Start Streaming. For the lowest delay, set the keyframe interval to 1 or 2 seconds.
3. In your app, the stream arrives like anyone else, with p.kind === "ingress":
room.on("participant-joined", (p) => addTile(p.id, p.kind === "ingress" ? `${p.name} (live)` : p.name));If OBS reconnects with the same key, the new stream replaces the old one. If OBS disappears, the stream is removed within about 30 seconds. Manage ingest points with GET /rooms/:roomId/ingress and DELETE /rooms/:roomId/ingress/:ingressId. A room can have up to 10.
Stream a call out
Mix the whole call into one video grid with everyone's audio, and send it to an audience:
curl -X POST https://api.appsocom.dev/rooms/town-hall/egress \
-H "Authorization: Bearer $APPSOCOM_API_KEY" -H "Content-Type: application/json" \
-d '{"destinations":[{"platform":"youtube","streamKey":"xxxx-xxxx"},{"platform":"facebook","streamKey":"FB-…"}]}'
# → {"egressId":"eg_…","status":"starting","playback":{"hls":"https://…/manifest/video.m3u8","iframe":"…"}}| Field | |
|---|---|
destinations |
[{ platform: "youtube" | "facebook", streamKey }] or [{ url: "rtmp(s)://…", streamKey }]. Keys are never returned. |
record |
true keeps a recording of the broadcast. |
width, height |
1280×720 by default, up to 1920×1080. |
You also get an HLS link and an embeddable player for watching on your own site. Expect the usual 10 to 20 seconds of delay on HLS, YouTube and Facebook.
| Endpoint | |
|---|---|
POST /rooms/:roomId/egress |
start (one at a time per room) |
GET /rooms/:roomId/egress |
status: starting, live, stopped or failed |
DELETE /rooms/:roomId/egress/:egressId |
stop |
POST /rooms/:roomId/egress/:egressId/destinations |
add a destination while live |
DELETE /rooms/:roomId/egress/:egressId/destinations/:id |
remove one |