RC RANDOM CHAOS

Indexing a year of video locally with Gemma 4 31B on a 2021 MacBook

· via Hacker News

Original source

Indexing a year of video locally on a 2021 MacBook with Gemma4-31B (50GB swap)

Hacker News →

A developer splitting his year between Kenya’s Maasai Mara and software work faced the same problem every videographer hits: an archive of raw footage growing faster than anyone could edit it, with files named IMG_*.mov sitting in folders like ‘Mara june 2024 backup final FINAL’. After dismissing a $140/month SaaS stack (generative B-roll was a brand risk, post cadence assumptions were unrealistic) he realized DaVinci Resolve 21 already covered most of the editing layer. The deeper insight was that AI editors all assume labeled footage — the real bottleneck was the index, not the editor.

He built a local-first indexing pipeline as a Claude Code skill (~1,400 lines of Python, mostly agent-written) that drops a plain-text .description.md sidecar next to each clip. The per-clip flow chains ffprobe and exiftool for metadata, Nominatim for reverse-geocoding, ffmpeg for frame extraction, WhisperX with pyannote for multilingual transcription and diarization, insightface for ArcFace face embeddings in a shared SQLite DB, and a single exhaustive vision call that emits YAML frontmatter plus prose. Backends are pluggable: Claude CLI, Anthropic API, or a local LM Studio endpoint for bulk work.

The punchline is the hardware. A 2021 M1 Max MacBook Pro with 64GB of unified memory — bought to survive Chrome and Resolve, not LLMs — runs Gemma 4 31B Q4 (≈28GB resident, 50GB swap) overnight against a year of footage, producing grep-able sidecars that survive drive moves and outlive the indexer itself. Sidecars over a central DB, one expensive vision pass capturing everything you might query later, and the editor becomes a thin layer on top.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.