r/webgpu • u/daniele93cc • Sep 29 '26
Real-time optical flow frame interpolation for HTML5 video with WebGPU, as a Chrome extension
I've been playing with WebGPU compute for a while and wanted a project with a real-time budget that actually matters to me: making 24/30/60 fps web video look smooth on 120/144/240 Hz displays. The result is FrameBoost, a Chromium extension that interpolates frames live on any standard HTML5 video.
How it works at a high level:
Grab frames from the video element and upload them as GPU textures
Estimate optical flow between consecutive frames with compute shaders [say which approach you used, e.g. block matching / pyramidal Lucas-Kanade / Farneback style, and how many pyramid levels]
Warp and blend to synthesize intermediate frames, presented at the display's refresh rate (30 → 144, 24 → 240, etc.)
Scene cut detection so it doesn't smear across cuts
Handling of frame edges and occlusions, which is where most of the ugly artifacts live
Things I ran into that might interest this sub:
[Frame pacing: how you sync presentation to vsync and deal with dropped frames]
[Getting video frames into WebGPU: importExternalTexture vs copying, and what it cost you]
[Workgroup sizes / memory layout choices that made the biggest perf difference]
Some sites serve video in a way that blocks GPU access, so the extension detects that and turns itself off instead of breaking playback
DRM streams (Netflix etc.) are a hard no, since the browser doesn't expose their frames to extensions
There's a live stats overlay showing source fps → output fps, GPU time and resolution, which made tuning a lot easier. Everything runs locally, nothing is uploaded, and the whole extension is about 46 KB.
I'd love feedback from people who know this space: better flow estimators that still fit in a few ms per frame, tricks for occlusion handling, or perf numbers on GPUs I don't own (especially iGPUs). Compare mode (original left, interpolated right) is free, so you can test it on any video. Full mode uses a one-time unlock per device (disclosure: I'm the dev).
https://chromewebstore.google.com/detail/frameboost/cklkjjeejomlkelkjmgdpahgpcjigahb
Happy to share more details on the shader pipeline if there's interest.
1
u/Still-Notice8155 Oct 01 '26
Very cool! I have done frame gen projects myself and used some of this techniques and find it interesting.