Trending:

Cloudflare unveils Streamline for custom video pipelines powered by Stream and Workers

Diagram of Streamline architecture showing Media Engine in a Container, a controlling Worker, and Durable Object orchestration
TechStaged-owned

Summary

  • Cloudflare released a developer playground named Streamline to demonstrate custom video pipelines on Cloudflare Stream and Workers.
  • Streamline enables rendering dynamic annotations on livestreams and creating alternate versions of hosted videos with burned-in subtitles.
  • Streamline consists of a Media Engine inside a long-running Container and a controlling Application built with Workers, with orchestration provided by Durable Objects.

Cloudflare has released Streamline, a developer playground that demonstrates how to build bespoke video experiences on Cloudflare’s platform. The system integrates Cloudflare Stream and Workers to modify video content in real time, enabling features such as dynamic annotations on livestreams and alternate versions of hosted videos with burned-in subtitles.

Streamline is designed as a two-component deployment for long-running media processing: a Media Engine that handles input, processing, and output, and a controlling Application built with Workers that creates, configures, and observes media sessions.

HOW STREAMLINE WORKS: ARCHITECTURE AND COMPONENTS

The Media Engine runs inside a Container and performs the actual media processing. A Go-based Controller translates HTTP requests into operations for the media engine, while the Processor performs the processing (with FFmpeg as the current internal implementation). TechStaged has also covered Cloudflare Workers AI Agents for Edge Applications.

A Durable Object coordinates the lifecycle and orchestration, while a separate Worker-based application provides the user interface, session management, and security controls.

INPUTS, OUTPUTS, AND LIVE PREVIEWS

Streamline can pull RTMP streams from a Stream Live input and publish RTMP output to another Stream Live input. It can also ingest a Cloudflare Stream HLS manifest and its segments to use hosted videos as input, then output a modified stream via RTMP.

For quick previews, Streamline can deliver a preview video over a WebSocket to a Durable Object relay, enabling low-latency viewing while a pipeline runs.

SESSION CONTROL AND API SURFACE

Users start a new session via the controlling Worker, which spins up a Streamline Container as needed, autonomously manages its lifecycle, and routes inputs and outputs to Cloudflare Stream.

Session configuration is expressed as a JSON object in session.start(), describing a pipeline with a sequence of operations such as overlays, filters, and encoding parameters. The pipeline can be driven by inputs from RTMP, HLS, or direct webcam data.

SECURITY, LIFECYCLE, AND LOCAL DEVELOPMENT

Streamline is designed with access control in mind: an authorized user or agent can start and control a session, with only one active session at a time. Stream Live Input keys are stored in Worker secrets or Durable Object storage and are not exposed via the user-facing API or browser storage.

In local development, the system can run with a local Docker instance, where the container lifecycle is simplified and a Durable Object is not used. This mode supports a single user and direct WebSocket connection to the local container for preview.

WHAT STREAMLINE MEANS FOR DEVELOPERS AND WHAT’S NEXT

Cloudflare describes Streamline as a modular framework that could be extended with dedicated encoding products in the future, with the current implementation using a media engine in a Container and a Go-based controller plus FFmpeg for processing.

Streamline exports two packages to developers: a high-level session-based API and a Durable Object base class that routes API requests, provides preview relay functionality, and offers hooks for security and access policy.

Reporting by Owen Blackridge; editing by TechStaged editors

Editorial disclosure: This article was prepared with AI assistance from a source-limited research package and passed TechStaged's automated factual, originality, licensing, and publication checks.

Our Standards: The TechStaged Editorial Principles.

f in

Owen Blackridge

Owen Blackridge

Technology Editor

Owen covers platform shifts, AI launches, and the practical impact of emerging technology on small teams.