Live Stream Inputs, WebRTC, DVR, and Broadcast Operations
How Cloudflare Stream Live works: create live inputs, broadcast with RTMPS, SRT, or WHIP, play with HLS, DASH, or WHEP, recordings, security, and troubleshooting.
This page summarizes Cloudflare Stream documentation on Stream Live: ingesting live video, delivering it to viewers, automatic recording, and day‑to‑day operations (pause inputs, rotate keys, DVR, simulcasting, and fixing common encoder problems).
Live inputs: what they are and how Stream Live works
Section titled “Live inputs: what they are and how Stream Live works”A live input is the object you create once per channel, show, or creator. Each input has its own stream key and ingest URLs. Creators send video over RTMPS, SRT (caller mode only), or WebRTC via WHIP; Cloudflare encodes multiple renditions and viewers play via the built‑in Stream Player or HLS / DASH (and WHEP for WebRTC playback).
Cloudflare Stream lets you or your users stream live video, and play live video in your website or app, without managing and configuring any of your own infrastructure.
— Cloudflare, Stream live video
For each live stream, you create a unique live input in the dashboard or API, give the creator the stream key, they broadcast to Cloudflare, and you embed playback on your site. Recordings are created automatically when recording.mode is automatic (the usual setup described in Start a live stream).
RTMPS and SRT: encoder-based live (OBS, hardware)
Section titled “RTMPS and SRT: encoder-based live (OBS, hardware)”After you subscribe to Stream, you can create Live Inputs in Dash or via the API. Broadcast to your new Live Input using RTMPS or SRT.
— Cloudflare, Start a live stream
Typical first test: create a live input, copy RTMPS URL (often rtmps://live.cloudflare.com:443/live/) and RTMPS Key, and paste them into OBS as a Custom service—see First Live Stream with OBS. SRT uses the same input model but suits newer codecs and accessibility features such as captions and multiple audio tracks (Start a live stream).
Encoder requirements (failures often map to webhook error codes):
- Video H.264, audio AAC (ADTS supported; LATM not).
- Combined bitrate roughly 2–14 Mbps; GOP 2–10 s, closed GOPs.
- Clients should reconnect after disconnects.
Recommendations include CBR when possible, GOP 4–8 s for standard HLS/DASH, and bitrate under about 10 Mbps for most content (Start a live stream).
Custom RTMPS ingest hostname
Section titled “Custom RTMPS ingest hostname”With custom ingest domains, you can configure your RTMPS feeds to use an ingest URL that you specify instead of using live.cloudflare.com.
— Cloudflare, Add custom ingest domains
Add the domain in Live inputs → Settings → Custom Input Domains, point a CNAME to live.cloudflare.com, and if DNS is on Cloudflare set the ingest hostname to DNS only (grey cloud). Custom ingest domains cannot be used on zones with zone holds enabled.
WebRTC live: WHIP broadcast and WHEP playback
Section titled “WebRTC live: WHIP broadcast and WHEP playback”WebRTC allows ultra-low latency (sub-second) live streaming (using WHIP) and playback (using WHEP) to thousands of concurrent viewers.
— Cloudflare, Ultra-low Latency with WebRTC
Stream Live WebRTC is generally available; delivery is billed like other Stream minutes (billing began October 15, 2026) (Ultra-low latency live with WebRTC GA, Pricing).
Creating a live input returns:
webRTC.url— WHIP publish URL (treat like a stream key).webRTCPlayback.url— WHEP play URL.
WHIP/WHEP use a single HTTP POST with SDP—no separate signaling server (First WebRTC broadcast in the browser). OBS 31+ can use Service WHIP with the full WHIP URL; set B Frames to 0 for WebRTC (Ultra-low Latency with WebRTC).
WebRTC vs RTMPS/SRT: when to use which
Section titled “WebRTC vs RTMPS/SRT: when to use which”| Goal | Typical ingest | Typical playback |
|---|---|---|
| Traditional encoders, LL-HLS beta, recordings, simulcast | RTMPS or SRT | HLS / DASH, Stream Player |
| Browser go-live, sub-second latency | WHIP | WHEP or Stream Player (auto WHEP when available) |
| DVR, clips, MP4 download of recording | RTMPS/SRT paths | HLS with dvrEnabled=true where supported |
Watch a live stream: Live Input ID vs Video ID
Section titled “Watch a live stream: Live Input ID vs Video ID”Playback URLs follow:
https://customer-<CODE>.cloudflarestream.com/<INPUT_ID|VIDEO_ID>/iframe
https://customer-<CODE>.cloudflarestream.com/<INPUT_ID|VIDEO_ID>/manifest/video.m3u8
Live Input ID — player shows the active broadcast or “Stream has not started” when idle; best for a permanent channel page (Watch a live stream).
Video ID — one broadcast and its recording after the event; best for a single episode or event page. Each new broadcast gets a new Video ID when recording mode is automatic.
Check whether an input is live:
curl -X GET \ -H "Authorization: Bearer <API_TOKEN>" \ https://customer-<CODE>.cloudflarestream.com/<INPUT_ID>/lifecycleA response with "live": true and videoUID means a broadcast is in progress (Watch a live stream).
For third-party players, DASH is recommended over HLS when Chromecast is involved (Watch a live stream). Optional manifest hint: clientBandwidthHint (Mbps) on manifest requests (Use your own player).
Live viewer count for custom players: GET https://customer-<CODE>.cloudflarestream.com/<INPUT_ID>/views (Get live viewer counts). Hide counts in the built-in player with hideLiveViewerCount on the live input (Start a live stream).
DVR mode: rewind and pause without leaving the live edge
Section titled “DVR mode: rewind and pause without leaving the live edge”Stream Live supports “DVR mode” on an opt-in basis to allow viewers to rewind, resume, and fast-forward a live broadcast. To enable DVR mode, add the dvrEnabled=true query parameter to the Stream Player embed source or the HLS manifest URL.
— Cloudflare, DVR for Live
Example iframe: .../iframe?dvrEnabled=true (DVR for Live). Prefer Video ID URLs for DVR so playback continues correctly after the broadcast ends; Live Input ID DVR does not expose past broadcasts after reload (DVR for Live).
Limitations include no DVR on DASH, possible quality-switch stalls on Live Input ID after end, degraded performance past ~3 hours, and reliance on HLS v8 (DVR for Live).
Recordings, replay, downloads, and clips
Section titled “Recordings, replay, downloads, and clips”When recording.mode is automatic, a new video is created when a broadcast starts; when the stream ends, the recording is usually ready within 60 seconds (Stream live video, Use the Stream Player).
List recordings for an input: GET /live_inputs/<UID>/videos and use entries with state: ready (Record and replay live streams).
MP4 download of a live recording: enable in the dashboard on the recording; only recordings under four hours can be downloaded as MP4 (Download live stream videos). Live recordings longer than seven days are truncated to seven days in storage (Start a live stream).
Live instant clipping uses preview manifests such as .../manifest/video.m3u8?duration=5m and should reference Video ID, not Live Input ID (Live Instant Clipping).
Billing for live matches the rest of Stream: recorded minutes and delivered minutes (Stream live video).
Control live inputs: disable, delete policy, and rotate broadcast keys
Section titled “Control live inputs: disable, delete policy, and rotate broadcast keys”Disable or enable an input (stop new connects)
Section titled “Disable or enable an input (stop new connects)”You can now disable a live input to reject incoming RTMPS and SRT connections. When a live input is disabled, any broadcast attempts will fail to connect.
— Cloudflare, Stream live inputs can now be disabled and enabled
Set "enabled": false via PUT on the live input, or use the dashboard (Start a live stream). Use cases: pause without deleting, end creator broadcasts programmatically, block new sessions on a compromised channel.
Rotate broadcast credentials
Section titled “Rotate broadcast credentials”You can now rotate the broadcast credentials for a Stream live input without changing the live input identifier.
— Cloudflare, Rotate Stream broadcast keys for live inputs
Rotation revokes old keys, disconnects encoders on stale credentials, and returns new credentials. POST .../live_inputs/{id}/rotate_keys; responses may include keysRotatedAt (Start a live stream).
Optional API knobs include deleteRecordingAfterDays (30–1096), timeoutSeconds (reconnect grace before a new video), requireSignedURLs, allowedOrigins, and preferLowLatency for LL-HLS beta (Start a live stream).
Simulcasting (restream) to YouTube, Twitch, and others
Section titled “Simulcasting (restream) to YouTube, Twitch, and others”Simulcasting lets you forward your live stream to third-party platforms such as Twitch, YouTube, Facebook, Twitter, and more. You can simulcast to up to 50 concurrent destinations from each live input.
— Cloudflare, Simulcast (restream) videos
Add outputs with POST .../live_inputs/{INPUT_UID}/outputs and an RTMP URL plus destination stream key. Individual outputs can be enabled or disabled during a broadcast (Simulcast (restream) videos). Simulcasting is not supported on the WebRTC-only ingest path (Ultra-low Latency with WebRTC).
Observability, webhooks, and troubleshooting
Section titled “Observability, webhooks, and troubleshooting”Dashboard Live Input details expose broadcast metrics and events for encoder-side health (Introducing observability for Stream Live Inputs).
Subscribe in Notifications to Stream events such as live_input.connected, live_input.disconnected, and live_input.errored (Receive Live Webhooks). Error codes include ERR_GOP_OUT_OF_RANGE, ERR_UNSUPPORTED_VIDEO_CODEC, ERR_UNSUPPORTED_AUDIO_CODEC, ERR_STORAGE_QUOTA_EXHAUSTED, and ERR_UNHEALTHY (Receive Live Webhooks).
Buffering, freezing, and “Stream has not started yet”
Section titled “Buffering, freezing, and “Stream has not started yet””On the input’s Metrics tab (Troubleshooting a live stream):
- Keyframe interval chart should sit steadily between 2s and 8s (try 4s first).
- Upload-to-duration ratio should stay below ~90%; above 100% suggests upload bitrate or network issues.
If connected but the player says Stream has not started yet: wait ~30s, confirm AAC audio, fixed GOP, then retry (Troubleshooting a live stream).
Connection failures: verify RTMPS URL and key, check whether the input is disabled or keys were rotated, and inspect live_input.errored webhooks (Troubleshooting a live stream).
Common mistakes
Section titled “Common mistakes”- Variable or automatic GOP instead of a fixed interval (often triggers
ERR_GOP_OUT_OF_RANGE). - Non-AAC audio or unsupported codecs for the chosen protocol.
- Using Live Input ID for DVR or clips when Video ID is required.
- Expecting recording + HLS playback on a WHIP-only workflow before checking current WebRTC limitations.
- Orange-clouding a custom ingest hostname instead of DNS only.
How to check this on your site
Section titled “How to check this on your site”- Create a test live input in the Live inputs flow or Start a live stream and confirm
enabledis true. - Broadcast with First Live Stream with OBS or First WebRTC broadcast in the browser and verify Connected status and metrics on the input detail page.
- Open the embed or manifest from Watch a live stream (Input ID vs Video ID as appropriate).
- End the stream, wait about 60 seconds, and confirm a
readyrecording via Record and replay live streams. - You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about.