peepshow/ how-to/ video-to-sqlite

Reel #H-13 Drop a video, query its frames with SQL

peepshow how-to / video-to-sqlite

Index every video into a queryable SQLite database

One file, zero server, full SQL. peepshow's SQLite sink writes every run into a typed schema — frames, transcripts, metadata, tags. Open with `sqlite3`, DBeaver, Datasette, or any DB-Browser to query across your entire video archive.

Steps

  1. Install peepshow
    npm install -g peepshow
  2. Run with the SQLite sink

    Schema auto-creates on first run.

    peepshow ./demo.mp4 --sink sqlite
  3. Query the archive
    sqlite3 ~/.peepshow/sinks/sqlite/peepshow.db 'SELECT * FROM frames LIMIT 5'
  4. Expose with Datasette

    Optional but ridiculous-fun — instant searchable UI.

    pip install datasette
    datasette ~/.peepshow/sinks/sqlite/peepshow.db
  5. Auto-sink for every run
    peepshow sinks add sqlite

Why it works

SQLite is the perfect long-term archive — one file, zero ops, queryable by every tool that speaks SQL. peepshow's SQLite sink builds a normalised schema (`runs`, `frames`, `transcripts`, `tags`, `sinks`) so you can answer 'which clips contain the word X' or 'show me every frame with motion above N' in plain SQL.

When it helps

  • Long-term personal video archives — searchable forever.
  • Research datasets where every clip's metadata needs SQL access.
  • Compliance / audit workflows where 'show me every frame where Y happened' is a regular query.

Pitfalls

  • Default DB lives in `~/.peepshow/sinks/sqlite/peepshow.db` — set `PEEPSHOW_SQLITE_PATH` to relocate.
  • Very high frame volumes (>1M frames total) — VACUUM occasionally.

Works with these LLMs

Pairs with these sinks