Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Claude Code now reads AGENTS.md if there is no Claude.md(claude.com ↗)
    67comments
  2. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    156comments
  3. Saving another 100TB of RAM(cloudflare.com ↗)
    24comments
  4. Cloudflare Quick Tunnels(cloudflare.com ↗)
    209comments
  5. Xcode 27.1 Beta Release Notes(developer.apple.com ↗)
    53comments
  6. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    10comments
  7. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    40comments
  8. How to Write with an LLM(sockpuppet.org ↗)
    231comments
  9. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    69comments
  10. OpenJev(openjev.com ↗)
    234comments
  11. The Implications of Linguistic Illegibility for LLM Security(arxiv.org ↗)
    13comments
  12. Two parallel neural ectoderm progenitors contribute to the developing brain(newscientist.com ↗)
    47comments
  13. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    27comments
  14. C++26: Trivial infinite loops are no longer undefined behaviour(sandordargo.com ↗)
    155comments
  15. From Geometry to Algebra and Back Again: 4000 Years of Papers (2023) [video](youtube.com ↗)
    discuss
  16. Cyclomatic Complexity in C#(ndepend.com ↗)
    3comments
  17. A search-and-inference database from scratch in pure Zig(antfly.io ↗)
    12comments
  18. How SpaceX streamlined the Raptor engine(construction-physics.com ↗)
    17comments
  19. Korea raises data breach fines to 10% of revenue(koreajoongangdaily.com ↗)
    53comments
  20. Minimal Phone 2(minimalcompany.com ↗)
    131comments
  21. I vibed a proof of Conway's conjecture(overreacted.io ↗)
    171comments
  22. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    87comments
  23. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    8comments
  24. US Military had close call after using AI for hallucinated intelligence report(cnn.com ↗)
    252comments
  25. Show HN: Ax-check.com – Can agents use your product?(ax-check.com ↗)
    25comments
  26. Cekura (YC F24) Is Hiring(ycombinator.com ↗)
    discuss
  27. Border agents can search cellphones without a warrant or reasonable suspicion(lawandcrime.com ↗)
    116comments
  28. North Korean nuclear test sets off years of earthquakes(science.org ↗)
    145comments
  29. Mathematicians Build Long-Awaited Graph Sandwich(quantamagazine.org ↗)
    15comments
  30. Show HN: Scry, programmable internet search w/ congestion pricing(scry.io ↗)
    16comments

Show HN: I compressed 10k PDFs into a 1.4GB video for LLM memory

61 pointsby 1y agogithub.com
23 comments
While building a Retrieval-Augmented Generation (RAG) system, I was frustrated by my vector database consuming 8GB RAM just to search my own PDFs. After incurring $150 in cloud costs, I had an unconventional idea: what if I encoded my documents into video frames?

The concept sounded absurd—storing text in video? But modern video codecs have been optimized for compression over decades. So, I converted text into QR codes, then encoded those as video frames, letting H.264/H.265 handle the compression.

The results were surprising. 10,000 PDFs compressed down to a 1.4GB video file. Search latency was around 900ms compared to Pinecone’s 820ms—about 10% slower. However, RAM usage dropped from over 8GB to just 200MB, and it operates entirely offline without API keys or monthly fees.

Technically, each document chunk is encoded into QR codes, which become video frames. Video compression handles redundancy between similar documents effectively. Search works by decoding relevant frame ranges based on a lightweight index.

You get a vector database that’s just a video file you can copy anywhere.

GitHub: https://github.com/Olow304/memvid

1y agoHN ↗

It does not. It's an indictment of the vector database working so poorly than even deliberately trying to make up something ridiculously inefficient (encoding PDFs as QR codes as H.264 video) is somehow comparable.

It's possible to be less efficient, but it takes real creativity. You could print out the QR codes and scan them again, or encode the QR codes in the waveform of an MP3 and take a video of that.

It's really, really bad.

1y agoHN ↗

How big were the original PDFs? Are they just text or images and other formatting too?

1y agoHN ↗

If they were less than 140k on average, then this isn't "compression" but "lossy expansion".

1y agoHN ↗

This is an extremely bad method of storing text data. Video codecs are not particularly efficient at compressing QR codes, given the high contrast between the blocks defeating the traditional DCT psychovisual assumptions of smooth gradients. There is little to no redundancy between QR code encodings of similar text.

You'd probably have a smaller database and better results crunching text into a zip file, or compressed rows in a sqlite database, or any other simple random-access format.

1y agoHN ↗

I'd say it be bewildering if there were not a more efficient way to store text for the purpose in context, than "QR codes in compressed video frames".

The vector database previously used must have been very inefficient.

1y agoHN ↗

The vector database previously used must have been very inefficient.

Especially if it was taking ~800 ms to do a search. At that speed, you'd probably be better off storing the documents as plain text, without the whole inefficient QR/H264 round-trip.

1y agoHN ↗

Is this more efficient than putting all of that in say a 7z archive?

I'd expect video frames to be maximally efficient if you sorted the chunks by image similarity somehow.

Also isn't there a risk of losing data by doing this since for example h.265 is lossy?

1y agoHN ↗

h.265 is lossy but QR codes are redundant

1y agoHN ↗

Is the probability of lost data zero across eg. millions of documents?

I see there's a 30% redundancy per document, but I'm not sure every frame in a h265 file is guaranteed to have more than 70% of a qr code being readable. And if it's not readable, then that could mean losing an entire chunk of data.

I'd definitely calculate the probability of losing data if storing text with a lossy compression.

1y agoHN ↗

Why not just do it locally? Or were the RAM consumption and the cloud cost comments distinct?

1y agoHN ↗

The results were surprising. 10,000 PDFs compressed down to a 1.4GB video file.

And how big was the total text in those PDFs?

1y agoHN ↗

Video compression handles redundancy between similar documents effectively.

Definitely not. None of the "redundancy" between, or within, texts (e.g. repeated phrases) is apparent in a sequence of images of QR codes.

1y agoHN ↗

Cut the cloud vendors out of the picture and build and query your index on a spare linux box.

I've only played with TF-IDF/BM25 as opposed to vector searches, but there's no way your queries should be taking so long on such a small corpus. Querying 10k documents feels like 2-10ms territory, not 900ms.

1y agoHN ↗

June... close enough, just like this and vector DBs o/

1y agoHN ↗

900 ms sounds like a lot for just 10,000 documents? How many chunks are there per document? Maybe Pinecone's 820 ms includes network latency plus they need to serve other users?

In Go, I once implemented a naive brute-force cosine search (linear scan in memory), and for 1 million 350-dimensional vectors, I got results in under 1 second too IIRC.

I ended up just setting up OpenSearch, which gives you hybrid semantic + full-text search out of the box (BM25 + kNN). In my tests, it gave better results than semantic search alone, something like +15% better retrieval.

1y agoHN ↗

I’m not sure why this is getting so much hate. This could be groundbreaking.

1y agoHN ↗

Indeed, they use FAISS for vector search, and the actual innovation is to store PDFs in a MP4 file. I think they should compare this to just compressing PDFs using ZIP, 7z, or RAR to see if it actually makes things better.