peepshow/ how-to/ cctv-llm-analysis

Reel #H-04 Hours of footage → minutes of signal

peepshow how-to / cctv-llm-analysis

Analyse CCTV footage with an LLM — motion-only frames, audit trail

CCTV is mostly nothing. peepshow's scene detector plus perceptual-hash dedup compress hours of footage into the handful of frames where something actually changes. The LLM only sees motion. Audit trail goes to a sink of your choice.

Steps

  1. Install peepshow
    npm install -g peepshow
  2. Run with motion-only preset

    Scene detection + perceptual-hash dedup drops static noise.

    peepshow ./overnight.mp4 --strategy scene --max 30 --dedup perceptual
  3. Push to a durable sink

    SQLite or S3 keeps the frame archive searchable.

    peepshow ./overnight.mp4 --sink sqlite --sink s3
  4. Hand frames to the LLM

    Drag the frame folder into Claude / ChatGPT for a per-frame review.

    peepshow ./overnight.mp4 --emit json | claude-cli -p 'List motion events'

Why it works

Surveillance footage has a poor signal-to-noise ratio. Native video upload to Gemini would bill ~258 tokens/second — an overnight 12-hour clip = 11M tokens, well over context limits. Scene detect picks frames where the visual entropy spikes; perceptual dedup drops the duplicates of an empty hallway. Result: hours of footage compressed to a handful of frames an LLM can actually reason about.

When it helps

  • Overnight security camera review without re-watching at 1×.
  • Dashcam incident extraction.
  • Industrial / lab timelapses where the interesting moments are sparse.

Pitfalls

  • Scene threshold is configurable (`--scene-threshold 0.3` default); raise for noisier footage.
  • Perceptual dedup uses pHash by default — works on luma changes, less reliable on pure colour shifts.
  • Long clips: chunk via `--start` / `--duration` if extracting in shifts.

Works with these LLMs

Pairs with these sinks