Built for the museum without the fancy hardware
Every county has a few of them: a one-room museum, a historical society, a library's local-history shelf. They hold the books nobody else has. Typescript memoirs, company histories, church and lodge records, the one copy of a town's story. Those books deserve to be searchable text, and the usual ways of getting there are out of reach.
The usual way
- An overhead book scanner costs thousands and needs a desk of its own, or a volunteer feeding a flatbed a page at a time for days.
- Sending the book out means a fragile, often irreplaceable volume leaves the building.
- Hosted OCR services charge per page, want the book as flat scans, and give back raw text with the errors left in.
With rifflescan
- An iPhone on a stand, a table, a lamp. Turn the pages and pause on each one. A 400-page book is about twenty minutes of filming.
- The book never leaves the room, and no one bends its spine flat.
- A laptop does the reading. The AI step then compares each page's photographs and reads, fixes the errors, and tells you which pages, if any, to film again.
What modern OCR and AI assistance change
Ten years ago this needed a flat, evenly lit scan or the OCR fell apart. Two things are different now, and rifflescan is built on both.
OCR that reads a photograph
Today's text detectors are neural networks trained on photos of the world, not on scanner output. They find lines of type on a page that is tilted, curved into the gutter, unevenly lit, or typed on onionskin with the other side showing through. Rifflescan uses one of these, RapidOCR, and runs it on an ordinary laptop CPU. No GPU, no account, nothing uploaded for this step.
An AI that proofreads against the footage
OCR alone gives you text with mistakes in it and no way to know where. Rifflescan sends each page's best photographs and its OCR reads to Claude, which reads the images itself: it fixes misreads, keeps paragraphs where the typist put them, fills in from a second frame what a thumb covered in the first, and when a word is truly unreadable, says so rather than guessing.
Honest about what it missed
The page numbers are read back out of the transcription. A number missing from the sequence is marked in the text as [page 357 not captured], and a report at the end lists exactly which printed pages to film again, so a volunteer can fix a scan in minutes without redoing the book. Before giving up on a page, the tool goes back into the video and looks again for it at looser limits.
How it works
Stills
One pass over the video measuring motion and sharpness per frame. A run of low-motion frames is a spread being held still. The sharpest few frames of each run are saved, rotated upright.
OCR
Every still goes through RapidOCR locally, on the CPU. The gutter between pages is found as a dark valley, and each page's lines are clustered into columns and put in reading order.
Figures
Photographs are found as large dark or halftone blocks, cut out of the best still, and deskewed with a perspective warp. A second pass catches framed line drawings and maps.
Reconcile
Stills of the same spread are grouped. Claude gets the best three photos plus each one's OCR, fixes the misreads, and fills what a hand or a page curl hid in one frame from another. Then a rescue pass hunts for any page number the sequence is missing.
rifflescan run scan.MOV --title "Matches"
# work/Matches-<date>/book.md, figures/ and report.txt when it finishes
One page, in and out
The Southern Pacific kept some of the Butte County's equipment right on its home rails. Several retired employees recall that the S.P. assigned 2-8-0 No. 2502 (2nd) to power the Stirling City mixed right after it assumed operation of the line. It is not likely that very many recognized the little Consolidation in its new livery as former B.C.R.R. No. 4. …

The Magalia depot in 1916. Note the photographer's hand-powered velocipede in left corner. It must have been hard pumping up the 3 per cent grade! (Southern Pacific)
Results so far
Three test videos of two books: a printed railroad history with photographs, and a carbon-copy typescript memoir. The number that matters is how many words came back marked illegible.
| Video | Pages | Words | Illegible per 1,000 |
|---|---|---|---|
| Printed book, 1080p, window glare | 13 spreads | 7,800 | 17 |
| Printed book, 4K, light from the side | 7 spreads | 5,000 | 1.2 |
| Typescript, 4K, hand-held | 40 pages | 13,800 | 0.1 |
Resolution was the lever. At 4K, body type is about 16 pixels high and the local OCR is confident enough that Claude has little left to repair. On the typescript, two words in 13,800 were smudged in every frame; one page was missed by the first pass because a hand was still moving, and the rescue pass recovered it from the video. The remaining loss on the printed book was glare on the inner column of the left page, which no software step can recover.
Shooting the book
- Record in 4K. iPhones default to 1080p. Change it under Settings, Camera, Record Video. It is the single biggest lever on quality.
- Fill the frame with the spread. Get close, or use 2x on the main lens. Desk around the book is wasted resolution.
- Put the phone on a stand. Then lock focus and exposure on the text with a long press. Every spread lands in the same place and stays sharp.
- Light behind or beside the camera. A window in front of you reflects off the page nearest it and washes out a column.
- Hold each spread about a second and a half. The still detector needs a quiet moment per spread.
- Hands at the margins. Hold pages by the bottom corner. A palm on the text is the one thing a second frame cannot always fix.
What you need, and where it stands
An iPhone that records 4K, a table and a lamp, and a Mac or Linux laptop with Python. The OCR step needs no GPU. The proofreading step talks to Claude through the Claude Code command line on a subscription, or through the Anthropic API with a key; those are the only pages that leave your machine.
Rifflescan is a working command-line tool in early development, tested on two books so far. The source will be published here when it is ready for other people's books. If you look after a collection like this and would try it on a book of yours, that is exactly the test it needs next.