Skip to content

Oct 25, 2026

Depth Capture

Depth Anything V2 Small, in the browser. The clip keeps its size and its sound.

depth
video

Upload a clip. Mediabunny reads it and writes it back. Each frame goes through Depth Anything V2 Small, here in the browser, through Transformers.js.

Closer is brighter. The depth is relative: each frame's 2% to 98%. The range shifts only a little from the last frame, so the shot doesn't flicker. Gamma is 0.8. The map is the small model's size, scaled up to the clip.

The file matches the clip's display size. An odd edge gains one pixel, so H.264 will take it. Sound stays: AVC in an MP4 first, WebM if that would drop the audio. If the browser can't keep the sound, it stops. Past 12 seconds, the rest is cut. WebGPU when the browser has it, WASM otherwise. The model downloads once and stays on this device.

Preview

Inspired by

Depth Anything V2: relative inverse depth. This is the small ONNX build, not a metric depth.