All articles
July 18, 20263 min read#ai#flutter#whisper#product#cuplikin

Building Cuplikin: Shipping an AI Video Clipper with Flutter, Whisper, and LLMs

How I built Cuplikin, an app that turns long videos into short clips with AI, as a solo founder: the pipeline, the Flutter desktop and mobile decisions, cost control for AI features, and what I would change.

Cuplikin is the first product I built under my own studio, Rancangin Aja. The idea is simple: you give it a long video, it finds the moments worth sharing, cleans up the transcript, adds captions, and exports clips for social media. It runs on Mac, iPhone, iPad, and Android. This post is about the engineering decisions behind it, especially the ones that were not obvious at the start.

The pipeline

Every clip goes through five stages:

  1. Transcribe with Whisper. On desktop this runs locally; on mobile it goes to the backend.
  2. Segment the transcript into candidate moments using timestamps and silence detection.
  3. Score candidates with an LLM prompt that asks, roughly, "which of these segments would make someone stop scrolling?" and returns a ranked list with a one-line reason.
  4. Caption by aligning the cleaned transcript back to word timestamps.
  5. Render with FFmpeg: crop, burn captions, export.

The backend is NestJS with PostgreSQL and Redis. Redis holds job queues because transcription of a 90-minute video is not something you do inside an HTTP request.

Why Flutter for a desktop-first product

The honest answer: I know Flutter deeply, and the product needed to exist on Mac first and on phones soon after. Writing the UI once and sharing the domain layer across four platforms let me ship as one person. The parts that are genuinely platform specific, like file pickers, local Whisper, and FFmpeg, sit behind interfaces in the data layer, with a desktop implementation and a mobile implementation that calls the API instead.

Same Clean Architecture I use for client apps. Same reason: when something breaks I know which layer to open.

Controlling AI cost

LLM calls are the only part of Cuplikin with a marginal cost that scales with usage, so cost control was a day-one feature, not a later optimisation:

  • Transcribe once, cache forever. The transcript is stored with the video hash. Re-running clip detection never re-transcribes.
  • Score in batches. One prompt scores up to forty segments. Scoring one segment per call would have been ten times the cost for no quality gain.
  • Small model first, big model on request. The default pass uses a cheaper model. A "find better hooks" button re-runs the top candidates with a stronger one. Most users never press it.
  • Hard budgets per user per day, surfaced in the UI, so there are no surprise bills on either side.

Captions were harder than clip detection

Everyone assumes the AI ranking is the hard part. It is not. Word-level caption alignment on messy audio, with two speakers and background music, took longer than everything else combined. Whisper timestamps drift; the fix was re-aligning the cleaned transcript against the original word timings with a forced-alignment pass, and letting the user nudge a caption by dragging it.

What I would change

  • Start with the export. I built detection first and export last. Users judge the product by the exported clip, so the render quality should have been the first thing nailed down.
  • Ship the Mac app alone for longer. Supporting four platforms from the first public build spread testing thin.
  • Telemetry on which clips get exported, not just generated. That is the only signal that tells you whether the ranking is actually good.

Cuplikin is live at cuplikin.com. If you are building something with Whisper or LLMs inside a Flutter app, the pipeline above is a reasonable place to start.

Written by
Ghozi Mahdi
Senior Mobile Engineer · Founder, Rancangin Aja
Get in touch