Memvid Put a Vector Database in an MP4, Then Dropped the Video
I spent an hour on a Sunday convinced a GitHub repo was a joke. The pitch: store your entire AI knowledge base inside an MP4 video file, encoding each memory as a QR code hidden in a video frame, no database server, no cloud subscription, no infrastructure to manage. It had 15,000 GitHub stars when I found it, so I kept reading. That QR-in-video trick is already deprecated. What replaced it is what I want to explain.
What Memvid is now
Memvid v2 packages everything your RAG pipeline needs into a single .mv2 binary file: data, vector embeddings, full-text indexes and metadata. No sidecar .wal file, .lock file or .shm file scattered around it. Just one file with everything inside.
Here's the layout:
┌────────────────────┐
│ Header (4KB) │ Magic, version, capacity
├────────────────────┤
│ Embedded WAL │ Crash recovery
├────────────────────┤
│ Data Segments │ Compressed Smart Frames
├────────────────────┤
│ Lex Index │ Tantivy full-text (BM25)
├────────────────────┤
│ Vec Index │ HNSW vectors
├────────────────────┤
│ Time Index │ Chronological ordering
├────────────────────┤
│ TOC (Footer) │ Segment offsets
└────────────────────┘
The data segments are still called Smart Frames, a name left over from when they really were video frames. The format underneath has changed completely: it's rewritten in Rust, with HNSW vector search, Tantivy BM25 full-text search, CLIP visual embeddings and Whisper audio transcription built in. You build the file once, ship it and query it.
The numbers
I expected performance to be the weak point. It isn't.
| Metric | Value |
|---|---|
| P50 query latency | 0.025 ms |
| P99 query latency | 0.075 ms |
| Throughput vs. standard | 1,372× higher |
| LoCoMo benchmark (long-horizon recall) | +35% over prior SOTA |
The low latency makes sense once you think about what isn't happening: no network round trip, no serialization step, no connection pool sitting in between. The index lives in memory. The data lives in a compressed file on disk. These are the project's own benchmarks. I haven't reproduced them myself, so treat the throughput multiple and the recall number as claims to check on your own corpus before repeating them as fact.
Where it fits
It's a good fit for read-heavy RAG apps built on a corpus that doesn't change much, for offline or air-gapped setups where a managed cloud service isn't an option, for edge devices you can ship a memory file to the same way you'd ship model weights and for handing a client a self-contained knowledge base with nothing to install.
It's a poor fit if you need frequent in-place updates (the format is mostly append-only) or a billion-scale corpus that needs distributed sharding and strict ACID guarantees with row-level deletes. The comparison that works for me is SQLite: nobody expects it to replace Postgres at scale, but reaching for Postgres when SQLite is clearly the right call is unnecessary weight. Memvid sits in the same spot for AI memory.
The RAG ecosystem has quietly settled on a default: pick a managed vector database, wire it up, pay the monthly bill. That default assumes a scale, an uptime requirement, a team size and a budget that a lot of early projects don't actually have. Memvid is a reminder that the assumption is optional. Sometimes you need Pinecone, sometimes pgvector and sometimes a file you can drop in a folder is enough.