Frame/Bench

video → frames → vision model → text
01 Endpoint
02 Source
03 Prompt

Your key goes straight from this browser tab to the base URL above and nowhere else. Serve this page over http://localhost — opening it as a file:// URL will fail the CORS preflight.

Ready.
Frames held
0
Keyframes found
Est. image tok
Input tok
Output tok
Cost
Latency
Model output
Nothing sent yet.
How the sampling works

Frames come out of a hidden <video> element: the page seeks to a timestamp, paints that instant onto a canvas, and encodes it as JPEG. The browser exposes time, not frame numbers, so every Nth frame is converted to an interval of N ÷ fps seconds — if you enter the wrong source fps, the spacing shifts but nothing breaks.

Those two modes give evenly spaced samples, not true I-frames. Keyframes mode is different: it runs a copy of ffmpeg compiled to WebAssembly, served from this site, and pulls the real I-frames with their actual presentation timestamps. The core is a 9.8 MB gzipped download, inflated in the page, and is only fetched the first time you use the mode. It needs an MP4 or MOV under 300 MB; anything else — or any failure along the way — quietly falls back to seek sampling at the interval above, and says so in the status line.

The image token estimate uses the classic 85 + 170-per-512px-tile tiling rule and ignores your text prompt, so treat it as a floor for budgeting. The counts reported after a call are the real ones from the API.

Decoding is done by the browser, so codec support is whatever your browser has. H.264 MP4 is safe everywhere; HEVC and some AV1 files will refuse to load.