Point your page's og:video at an og.video URL. The video renders at the edge on the first view, streams out faster than it plays, and is cached for every view after that.
No headless browser. Each scenario is a small program that draws frames with a Rust compositor and encodes them with x264, both compiled to WebAssembly and running inside a Cloudflare Worker.
Change the fields to build a URL. Fields left at their default stay out of the URL.
1200x630, 7 s
1200x630, 7 s
1200x630, 7 s
1200x630, 7 s
1200x630, 7 s
1200x630, 7 s
GET /<scenario>.mp4?<params> the video (H.264 MP4, streamed) GET /<scenario>.png?<params> the last frame, for og:image GET /<scenario>?<params> a share page with og:video tags GET /<scenario>.json?<params> resolved params, content id, packed URL POST /<scenario> JSON params in, a short /<scenario>/<id>.mp4 out
Arrays and objects go in the query string as JSON, or packed into ?s=. For long params, POST them once and use the short URL. Renders that miss the cache are rate limited per address.
<meta property="og:video" content="https://og.video/kinetic.mp4?title=Hello"> <meta property="og:video:type" content="video/mp4"> <meta property="og:video:width" content="1200"> <meta property="og:video:height" content="630"> <meta property="og:image" content="https://og.video/kinetic.png?title=Hello">