Case study
Problem
A thumbnail decides whether a video gets watched, and the frame that would make a good one is usually already in the footage: a half-second reaction somewhere in twenty minutes. Finding it means scrubbing by hand, and AI thumbnail tools skip the question by generating a new image instead.
What it does
ClickMoment listens to the video and watches it, finds the segments where speech, sound and picture spike together, and samples those densely. It returns three moments that already work as thumbnails, each with what a viewer would feel at a glance. It describes each moment without giving design advice, and the creator picks one.
System
How a video becomes three moments — and what runs underneath. Click Moment analysis to open it.
What finds the moment
A video arrives with a light brief (a title hint, a mood, the niche), and its length is checked first.
Sampling twice
Sampling at a fixed rate spends most frames on someone talking to camera and still misses a half-second reaction. ClickMoment samples twice: a cheap sparse pass to find where things happen, then a dense pass only there. That means about three frames a second in a critical segment and one every three seconds in a quiet one, stretched for longer videos.
Fusing signals
Each segment gets a trigger from three streams: story (what's said and how), sound (energy, drops, silence before impact) and picture (cuts, motion). The picture counts fully and the other two half each. Sound alone can reach high but never critical; critical needs something visible happening plus a voice or a sound. That rule keeps a loud but static stretch from swallowing the frame budget.
Scores, then images
The narrowing is deterministic. Segments are ranked by importance and by how many streams agree, frames are scored with niche-specific weights, and near-duplicates are dropped by timestamp and perceptual hash until ten spread-out frames are left. Only then does Gemini look at the images with their scores and pick exactly three, which comes to about $0.002 of model cost per video.
Describe, don't prescribe
The product's position was that it finds moments and doesn't teach design, so the output is observational: what emotion reads, whether a curiosity gap is already there, and whether the frame survives a two-second scan on a phone. Prescriptive words are banned in the prompt and stripped from the output as a second guardrail.
Cheap when idle
Uploads go straight from the browser to GCS through a signed URL, signed through IAM so the container holds no key file. Analysis runs as one request on a Cloud Run container that scales to zero. Every stage writes its signals to the bucket per project, so any result can be traced back to the segment and stream that produced it, and files expire after 90 days. The service, bucket and IAM are all in Terraform.
Architecture
- 01Sign in (Supabase), then upload straight to GCS by signed URL
- 02Length check: 30 minutes max
- 03Listen: speech lane → transcript → speech semantics and audio saliency, in parallel
- 04Watch: sparse frames → shot change and motion spikes
- 05Fuse into importance segments, each with its own sampling density
- 06Dense frame extraction in the top segments
- 07Niche-weighted scoring, dedupe, ten spread-out frames
- 08Gemini names three moments; the creator's pick is saved
Stack
- FrontendVanilla JS on Vercel + a serverless API proxy
- Auth + dataSupabase: Google OAuth, Postgres, row-level security
- APIFastAPI on Cloud Run (2 vCPU, 4 GiB, scale to zero)
- StorageGCS with signed URLs, 90-day lifecycle
- AudioAssemblyAI, Silero VAD, wav2vec2 emotion, librosa
- Visionffmpeg, OpenCV, MediaPipe, FER+ (ONNX)
- LLMGemini 2.5 Flash (pick) and 2.5 Pro (story lines)
- Infra as codeTerraform
Outcomes
- Ran end to end in production: sign-in, upload, analysis, results, saved picks
- About $0.002 of model cost per video; everything else is signal processing on one container
- Every result traceable to the segment and signal that produced it
- Now inactive
Code is private — happy to walk through it.