Trimbin - a production memory for the editing room

Tagline

Turn every take into timecoded evidence, then let editors choose exactly what stands.

Inspiration

Film and video productions create far more material than reaches the final cut: alternate performances, resets, safety takes, continuity details and technical problems. The footage survives, but the reason a team chose one moment over another is often scattered between memory, messages and handwritten notes.

Trimbin takes its name from the physical trim bin. It is built as a production memory for the editorial team: a place where footage, evidence and the human decision remain connected without asking an AI to make the final creative call.

What it does

Trimbin is an assistant-editor workspace, not an automatic editor or finishing NLE.

  1. Ingest and verify footage. Editors upload a shoot day through resumable, direct-to-Cloud-Storage transfers. Trimbin reads slate evidence and proposes scene, shot, take and camera placement. Ambiguous, duplicate and unreadable footage stays visible for a person to verify; nothing is silently deleted or moved because a model is uncertain.
  2. Analyse the whole take. A worker prepares browser proxies, sprites and deterministic media measurements, then runs full-duration analysis in overlapping windows. Findings are timecoded and can describe focus, exposure, motion, freezes, silence, obstructions, continuity, slate/action boundaries and incomplete action. Style-sensitive signals such as handheld motion or darkness remain evidence to review, not automatic faults.
  3. Review evidence on one clock. The Shot Review Cockpit has an Inspect mode for one reviewing take and a Compare performances mode when a shot has more than one take. Editors can click a finding to seek directly to its range, confirm, dismiss, correct, adjust or withdraw a review decision, and compare recordings without confusing a technical observation with an acting choice.
  4. Choose safe source ranges. Candidate clean ranges cannot cross active issue ranges. Editors can verify a clean range, add one or more source ranges from one or several takes, drag their boundaries within safe limits, and save the ordered selection with revision protection. A later accepted issue crops any overlapping draft range instead of leaving an impossible selection.
  5. See the editorial output. Coverage Reel plays a scene's confirmed source portions in order and shows unresolved gaps. Film Preview carries those portions across the project or lets a team arrange an independent saved sequence without altering the source archive. Scene handoff includes CMX3600 EDL and timeline-marker CSV exports with measured source frame rates.
  6. Find the decision later. Natural-language search can retrieve a scene, shot, action, dialogue, issue or decision and returns a playable source range with its supporting evidence. Comments, finding actions, source selections and history remain attributable and queryable.

The editor remains in charge throughout. A technically clean take may not be the best performance; a technically imperfect take may be the moment the story needs. Trimbin records the evidence and the reason, but the human chooses.

How we built it

  • Next.js and React provide the review, ingest, coverage and Film Preview workspace.
  • FastAPI provides bounded commands and screen-shaped read models.
  • Cloud Run and Pub/Sub separate interactive API work from long-running ffmpeg and Gemini analysis jobs.
  • Cloud Storage and Cloud CDN hold originals, HLS proxy manifests, slate frames and sprite sheets.
  • ffmpeg produces proxies and deterministic technical measurements in the media pipeline.
  • Gemini on Vertex AI, called through google-genai with typed Pydantic contracts, reads slate evidence and produces bounded observational analysis. It does not write executable SQL or make final editorial decisions.
  • Firestore owns mutable operational state: projects, structure, jobs, current selections and optimistic revision checks.
  • ClickHouse Cloud stores immutable placement, analysis, finding, decision and retrieval evidence. Runtime search uses the official read-only mcp-clickhouse path with fixed query shapes; playback and UI interactions do not wait on ClickHouse.
  • GitHub Actions and Terraform keep CI and infrastructure reproducible.

Agent architecture

The earlier Trimbin concept remains intact: AI should surface evidence and close calls, while the editor owns the creative decision. The implementation is now more explicit about where each agent is allowed to act.

  1. Deterministic media pass: ffmpeg and media probes first establish duration, frame rate, audio/video properties, proxies and sprites. This pass makes no creative judgement.
  2. Slate Agent: receives only the opening six seconds at low resolution. It reads scene, shot and take evidence, then proposes placement. An unreadable or uncertain slate stays in the placement inbox for verification; it never silently files footage.
  3. Embedding pass: a 768-dimension multimodal embedding supports similarity checks and picture-based retrieval. A likely misfile is a proposal to inspect, never an automatic move.
  4. Segment Agent: covers the complete take in 60-second windows with an 8-second overlap. It returns bounded timecoded observations, moments, attempts and technical/continuity evidence. Overlap evidence is consolidated so the same event does not become duplicate review work.
  5. Analyst: compares takes only when a shot needs comparison. Deterministic measurements resolve clear technical gaps cheaply; close calls can receive technical and continuity specialist reports, then an evidence-only chief synthesis. Performance remains an editor decision, not a machine ranking signal.
  6. Archivist: turns a natural-language question into fixed search filters, retrieves read-only ClickHouse evidence, then explains only the returned rows. It cannot execute arbitrary SQL or invent an answer from unseen footage.

Every agent output is typed, versioned and preserved with source-time evidence. Findings can be confirmed, dismissed, corrected, range-adjusted or withdrawn by a person. No agent may erase footage, settle a disputed placement, or make the final editorial selection.

Trimbin architecture

Estimated operating cost

This is a planning estimate, not a promise of a fixed bill. It is based on the deployed demo topology in us-central1: one minimum Cloud Run API instance (1 vCPU, 2 GiB), one minimum web instance (1 vCPU, 512 MiB), a scale-to-zero 2 vCPU/4 GiB ingest worker, an external HTTPS load balancer with Cloud CDN, regional Cloud Storage, Firestore, Pub/Sub, Vertex AI Gemini calls and one 8 GiB ClickHouse Cloud replica. The actual bill moves chiefly with footage minutes, repeat analysis, viewer egress and the ClickHouse Cloud rate selected in its console.

Monthly demo workload assumption Estimate (USD) Main reason
Always-on GCP baseline $33-$40 Two minimum Cloud Run services plus two global forwarding rules; the load balancer is about $0.025/hour before data processing.
Processing, storage and app state $8-$20 30 hours of footage processed, 100 GiB retained, Firestore, Pub/Sub, Secret Manager, Artifact Registry and logs. Originals transition to Nearline after 30 days.
Gemini/Vertex AI agents $15-$45 Full-duration overlapping observations, slate reads, embeddings and occasional multi-take comparison. It is intentionally usage-based rather than a permanently running agent runtime.
CDN and Internet egress $8-$30 About 100-300 GiB of proxy viewing after cache benefit. This becomes the largest GCP variable when a project is widely watched.
ClickHouse Cloud $100-$200 One 8 GiB replica kept available for the immutable evidence archive and retrieval. Verify the selected service's live hourly rate in ClickHouse Cloud because its published pricing is consumption/contract based.
Estimated total $165-$335/month A small active demo or pilot. Excludes taxes, domain registration and any paid support plan.

At near-zero traffic, budget roughly $135-$240/month because the load balancer, minimum Cloud Run services and non-idling ClickHouse replica remain. At larger scale, add the incremental worker/Vertex analysis cost per uploaded minute and CDN egress per viewed GiB; do not multiply the baseline blindly.

There is no separately billed "Agent Engine" runtime in the current implementation. The agents are typed Gemini calls from the Cloud Run worker through Vertex AI, so their cost is visible as model input/output and embedding usage. Full-take analysis is queued once per settled clip, retries are bounded, direct browser uploads bypass the API, CDN caches immutable proxy segments, and the comparison panel is skipped for clear measurement winners to limit avoidable model and compute spend.

Pricing references: Cloud Run, Cloud Storage, Cloud Load Balancing, Vertex AI Generative AI, Firestore and ClickHouse Cloud. Recalculate against the billing account, model SKU and ClickHouse console before a production commitment.

Challenges we ran into

A video problem is not always an error. A handheld shot can be intentional; a dark shot can be correct; a clean technical take can still be the wrong performance. We separated measurable signals, model observations and human editorial decisions so a suggestion never becomes a silent rejection.

A useful range must stay truthful after review changes. A clean selection cannot overlap a confirmed issue. We made range operations issue-aware, non-overlapping and revision-safe, so editors see the remaining usable portions rather than a contradictory timeline.

One data store cannot responsibly do every job. Firestore is appropriate for the current mutable decision; ClickHouse is appropriate for immutable evidence, read models and retrieval. The system writes durable operational state first and delivers append-only archive events idempotently, keeping the review interface responsive without losing provenance.

Video analysis must cover the actual recording. A first-30-seconds demo would miss the end of a take. Trimbin uses overlapping full-duration windows, keeps completed analysis available while a retry runs, and preserves history instead of replacing old evidence invisibly.

Accomplishments that we're proud of

  • Built an end-to-end workflow from resumable upload to timecoded review, multi-range source selection, scene playback and editorial handoff.
  • Kept creative authority with the editor while making AI and deterministic evidence directly inspectable at the exact moment it applies.
  • Made clean candidates, issue ranges and selected ranges obey the same non-overlap rules, including automatic crop-before-save behaviour.
  • Preserved a traceable record of machine findings, human corrections, retractions, selections, comments and sequence revisions.
  • Used ClickHouse as an editing-intelligence archive and retrieval layer rather than as a blocking dependency for video playback.

What we learned

Model confidence is not editorial truth, and no human correction is not proof of accuracy. Trimbin's review reporting therefore distinguishes processed footage, completed analysis and explicit human review. It reports no reviews as "not measured", not as 100% accuracy.

We also learned that a strong editing tool needs to preserve alternatives. The useful answer is often not "take 4 wins" but "these 18 seconds of take 4 are clean, this action completes in take 2, and the editor chose these portions for this reason."

What's next for Trimbin

  • Run a human-labelled representative-footage evaluation to measure detection precision and recall instead of inferring it from product usage.
  • Add verified NLE round trips and richer interchange after testing source timecode, reel metadata and frame-rate behaviour in target applications.
  • Improve dialogue/beat alignment and reference-specific continuity evidence.
  • Add professional conform, grading, audio mixing and render workflows only as integrations; they are intentionally outside the current browser preview.

Links

Built With

  • agent
  • ai-filmmaking
  • cinematic
  • clickhouse
  • computer-vision
  • creative-ai
  • film-continuity
  • film-production
  • gcp
  • multimodal-ai
  • post-production
  • take-review
  • video-editing
Share this project:

Updates

Submission history