Browser capture, server-side compositing, two-tier storage

Self-Hosted Video System

Recording is the easy part. Storage economics is the interesting one.

Try Zoomy

The problem

Browser-recorded WebM has no reliable duration. Storing every video twice is a bill that compounds.

The product is a self-hosted video platform for sales teams. A rep records in the browser, the server composites a branded deliverable with FFmpeg, and the published video is served to the prospect. Two constraints shaped the design. Browser-recorded WebM has no reliable duration — the container does not carry it, and the duration that JavaScript reports is often wrong. And storing every video twice (once as the raw recording, once as the published deliverable) is a bill that compounds with every rep and every call.

FFmpeg composite
1FFmpeg composite
storage tiers
2storage tiers
origin video after publish
0origin video after publish

How it works

The browser never talks to a model or a storage provider directly. The raw recording is uploaded to origin storage, a serverless function composites the branded deliverable with FFmpeg, and the published video is moved to Cloudflare Stream. The origin copy is deleted after a successful publish, so the long-term storage cost is the published video only. A design document that originally planned to keep the raw recording was reversed when production showed the cost.

Engineering decisions

The non-obvious calls — where the straightforward approach fails, and what it cost to find that out.

01

Delete the origin after publish

Why it breaks

Keeping the raw recording after publish doubles the storage bill for every video, forever. The raw recording is only useful for re-compositing, which is rare.

What I did

The origin copy is deleted after a successful publish to Cloudflare Stream. The design document that originally planned to keep it was reversed when production showed the cost.

Correctness in production

What keeps it right once nobody is watching it run.

Duration is measured, not trusted

Browser-recorded WebM has no reliable duration. The composite measures the actual duration rather than trusting the value reported by JavaScript.

Ready to upgrade your store's infrastructure?

Whether you want this exact architecture deployed to your store, or a completely bespoke solution built from scratch.

I want this exact solution.

Skip the R&D. I can deploy the Self-Hosted Video System architecture directly to your operations in days, not months.

I need something custom.

Have a unique workflow? Let's build a bespoke app tailored perfectly to your complex business needs.