Generating MP4 downloads from Cloudflare Stream is now up to 40% faster, with no changes to your implementation required. This improvement is most impactful for on-demand videos over 1 minute in duration.
You can generate an MP4 download in the Dashboard, with the cf, the Cloudflare CLI CLI, or by sending a POST request.
Stream WebRTC support lets you deliver high quality live video to thousands of concurrent viewers in milliseconds. WebRTC is compatible with native Web APIs and standard protocols, so creators can go live from a browser without needing a separate broadcast application. This powers platforms to build custom experiences with deep feature integration for creators as well as viewers. Here's how to get started with a Stream live input and a browser.
Usage-based billing for WebRTC begins today, October 15, 2026 and follows the standard rates for minutes of video delivered. Refer to pricing ↗︎ for rates.
What changed
While in beta, Stream’s WebRTC support was rebuilt from the ground up to leverage Cloudflare Realtime ↗︎’s primitives for stability and scale while managing these components in Stream’s familiar, unified API that makes it easy to build. We also adopted the latest WHIP and WHEP protocol standards for Trickle ICE, server and client offer modes, and counter-offer support for improved player library compatibility and network traversal adaptability. Finally, WebRTC delivery will now be visible in Stream’s analytics ↗︎ and billable usage charts.
How does this relate to Cloudflare Realtime
Realtime exposes a set of tools and primitives to build applications that connect people, AI systems, and devices together in many-to-many experiences powered by WebRTC. Stream leverages these building-blocks to deliver one-to-many broadcast capabilities, controlled and managed by a single, unified API with features like the built-in player ↗︎ and analytics ↗︎ that make it easy to get started.
# Using cf, the new Cloudflare CLIcf stream live-inputs create# Using an API request,curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/stream/live_inputs \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -X POST
The response will include webRTC and webRTCPlayback properties, each containing a url for WHIP (broadcast) and WHEP (playback) respectively.
Next, you can go live using WHIP directly from a browser or supported broadcast software. Refer to our new tutorial ↗︎ that shows a dependency-free way to broadcast live video with browser-native JavaScript.
Finally, you can play using WHEP using Stream’s built-in player ↗︎, a supported player app/library, or simple JavaScript:
Abbreviated JavaScript playback examplejs
const pc = new RTCPeerConnection(); // 1. Ask to receive one audio track and one video track. pc.addTransceiver("video", { direction: "recvonly" }); pc.addTransceiver("audio", { direction: "recvonly" }); // 2. Attach incoming media to the video element as it arrives. const stream = new MediaStream(); document.getElementById("playback-video").srcObject = stream; pc.ontrack = (event) => stream.addTrack(event.track); // 3. Create the SDP offer and set it as the local description. const offer = await pc.createOffer(); await pc.setLocalDescription(offer); // 4. POST the offer to the WHEP endpoint. const response = await fetch(WHEP_URL, { method: "POST", headers: { "Content-Type": "application/sdp" }, body: offer.sdp, }); // 5. Apply the SDP answer returned by Cloudflare. const answer = await response.text(); await pc.setRemoteDescription({ type: "answer", sdp: answer });
You can now rotate the broadcast credentials for a Stream live input without changing the live input identifier.
Use key rotation when live input credentials may have been shared with the wrong audience, exposed in client code or a screenshare, or need to be refreshed as part of your security process. Rotating keys revokes the old credentials, disconnects broadcasts using stale credentials, and returns refreshed credentials in the API response.
To rotate keys for a live input, make a POST request to the rotate_keys endpoint:
curl --request POST \https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/rotate_keys \--header "Authorization: Bearer <API_TOKEN>"
Live input responses now also include keysRotatedAt, which indicates when the live input keys were last rotated. This field is omitted for live inputs whose keys have never been rotated.
You can now interact with your Stream video library using new bindings for Workers! This allows customers to upload content to Stream, provision direct uploads, manage videos, and generate signed URLs from a Worker without making authenticated API calls. We're excited to bring Stream and Workers closer together to empower more programmatic pipelines, tighter integrations, and support generative AI and inference workloads.
Use the Stream binding when you want to:
Upload videos from URLs or create basic direct upload links for end users
Generate signed playback tokens without managing signing keys
Manage video metadata, captions, downloads, and watermarks
Build video pipelines entirely within Workers
To get started, add the Stream binding to your Wrangler configuration:
Generate a video with AI and upload directly to Stream or send a URL of a file you already have:
const aiResponse = await env.AI.run( "google/veo-3.1", { prompt: "A dog walking next to a river", duration: "10s", aspect_ratio: "16:9", resolution: "1080p", generate_audio: true, }, { gateway: { id: "experiments" }, },);// Veo will return a URL of the generated asset.const videoUrl = aiResponse.result.video;// Alternative option: a video of the Austin Office mobile// const videoUrl = 'https://pub-d9fcbc1abcd244c1821f38b99017347f.r2.dev/aus-mobile.mp4';// Upload to Stream by providing a URLconst streamVideo = await env.STREAM.upload(videoUrl);// The streamVideo response will include the video ID, playback and manifest// URLs, and other information, just like the REST API.
const aiResponse = await env.AI.run( 'google/veo-3.1', { prompt: 'A dog walking next to a river', duration: '10s', aspect_ratio: '16:9', resolution: '1080p', generate_audio: true, }, { gateway: { id: 'experiments' }, },);// Veo will return a URL of the generated asset.const videoUrl = aiResponse.result.video;// Alternative option: a video of the Austin Office mobile// const videoUrl = 'https://pub-d9fcbc1abcd244c1821f38b99017347f.r2.dev/aus-mobile.mp4';// Upload to Stream by providing a URLconst streamVideo = await env.STREAM.upload(videoUrl);// The streamVideo response will include the video ID, playback and manifest// URLs, and other information, just like the REST API.
Generate a signed URL without using a signing key or an API call:
const video_id = "ce800be43a9772f4bb02f35b860fb516";const token = await env.STREAM.video(video_id).generateToken();// Use the "token" in an iframe embed code, manifest URL, or thumbnail:const embedUrl = `https://customer-igynxd2rwhmuoxw8.cloudflarestream.com/${token}/iframe`;
const video_id = 'ce800be43a9772f4bb02f35b860fb516';const token = await env.STREAM.video(video_id).generateToken();// Use the "token" in an iframe embed code, manifest URL, or thumbnail:const embedUrl = `https://customer-igynxd2rwhmuoxw8.cloudflarestream.com/${token}/iframe`;
For setup instructions and the full API reference, refer to Bind to Workers API.
Get started with your Agent
Add a binding for Cloudflare Stream (env.STREAM). On the watch page, use the
Stream binding to get info based on the ID, and leverage video.meta.name as
the page title.
You can now use a Workers binding to transform videos with Media Transformations. This allows you to resize, crop, extract frames, and extract audio from videos stored anywhere, even in private locations like R2 buckets.
The Media Transformations binding is useful when you want to:
Transform videos stored in private or protected sources
Optimize videos and store the output directly back to R2 for re-use
Extract still frames for classification or description with Workers AI
Extract audio tracks for transcription using Workers AI
To get started, add the Media binding to your Wrangler configuration:
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.
This gives you more control over your live inputs:
Temporarily pause an input without deleting it
Programmatically end creator broadcasts
Prevent new broadcasts from starting on a specific input
To disable a live input via the API, set the enabled property to false:
New information about broadcast metrics and events is now available in
Cloudflare Stream in the Live Input details of the Dashboard.
You can now easily understand broadcast-side health and performance with new
observability, which can help when troubleshooting common issues, particularly
for new customers who are just getting started, and platform customers who may
have limited visibility into how their end-users configure their encoders.
To get started, start a live stream (just getting started?), then visit the Live Input details page in Dash.
See our new live Troubleshooting guide
to learn what these metrics mean and how to use them to address common broadcast
issues.
We now support audio mode! Use this feature to extract audio from a source video, outputting
an M4A file to use in downstream workflows like AI inference, content moderation, or transcription.
For example,
Example URLtext
https://example.com/cdn-cgi/media/<OPTIONS>/<SOURCE-VIDEO>https://example.com/cdn-cgi/media/mode=audio,time=3s,duration=60s/<input video with diction>
We are adding source origin restrictions to
the Media Transformations beta. This allows customers to restrict what sources
can be used to fetch images and video for transformations. This feature is the
same as --- and uses the same settings as ---
Image Transformations sources.
When transformations is first enabled, the default setting only allows
transformations on images and media from the same website or domain being used to make
the transformation request. In other words, by default, requests to
example.com/cdn-cgi/media can only reference originals on example.com.
Adding access to other sources, or allowing any source,
is easy to do
in the Transformations tab under Stream. Click each domain enabled for
Transformations and set its sources list to match the needs of your content. The
user making this change will need permission to edit zone settings.
Cloudflare Stream has completed an infrastructure upgrade for our Live WebRTC beta support which brings increased scalability and improved playback performance to all customers. WebRTC allows broadcasting directly from a browser (or supported WHIP client) with ultra-low latency to tens of thousands of concurrent viewers across the globe.
Additionally, as part of this upgrade, the WebRTC beta now supports Signed URLs to protect playback, just like our standard live stream options (HLS/DASH).
Today, we are thrilled to announce Media Transformations, a new service that
brings the magic of Image Transformations to
short-form video files, wherever they are stored!
For customers with a huge volume of short video — generative AI output,
e-commerce product videos, social media clips, or short marketing content —
uploading those assets to Stream is not always practical. Sometimes, the
greatest friction to getting started was the thought of all that migrating.
Customers want a simpler solution that retains their current storage strategy to
deliver small, optimized MP4 files. Now you can do that with Media
Transformations.
To transform a video or image,
enable transformations for your
zone, then make a simple request with a specially formatted URL. The result is
an MP4 that can be used in an HTML video element without a player library.
If your zone already has Image Transformations enabled, then it is ready to
optimize videos with Media Transformations, too.
For example, we have a short video of the mobile in Austin's office. The
original is nearly 30 megabytes and wider than necessary for this layout.
Consider a simple width adjustment:
The result is less than 3 megabytes, properly sized, and delivered dynamically
so that customers do not have to manage the creation and storage of these
transformed assets.
Previously, all viewers watched "the live edge," or the latest content of the
broadcast, synchronously. If a viewer paused for more than a few seconds,
the player would automatically "catch up" when playback started again. Seeking
through the broadcast was only available once the recording was available after
it concluded.
Starting today, customers can make a small adjustment to the player
embed or manifest URL to enable the DVR experience for their viewers. By
offering this feature as an opt-in adjustment, our customers are empowered to
pick the best experiences for their applications.
When building a player embed code or manifest URL, just add dvrEnabled=true as
a query parameter. There are some things to be aware of when using this option.
For more information, refer to DVR for Live.
Stream's generated captions
leverage Workers AI to automatically transcribe audio and provide captions to
the player experience. We have added support for these languages: