How it works
Fingerprints, one code a minute, and a public record.
Everything here runs as plain TypeScript in the browser, plus one small contract on Monad. The same engine code runs on the server for tests.
1. Sound fingerprints
The stream's audio is converted to 8,000 samples a second and turned into a spectrogram, a picture of which frequencies are loud at each moment. The engine keeps the strongest peaks, up to 30 a second, and pairs each peak with a few that follow it. Each pair becomes a small hash: the first peak's frequency, the second's, and the time between them.
This is the idea behind song-recognition apps. Captions, cropping and re-compression barely move those peaks, so a 15-second clip still produces hundreds of the same hashes. Matching counts which time offset most of the clip's hashes agree on. In the test suite, the right offset collected 406 agreeing hashes and the next best collected 5.
2. Picture fingerprints
Each second, the frame at the half-second mark is shrunk to 64 by 64 grey pixels and reduced to a 256-bit hash, in the style of Meta's PDQ. Two frames that look alike have hashes that differ in few bits.
A vertical clip keeps only about a third of a widescreen frame, which breaks this kind of hash. So the stream side hashes two versions in advance: the full frame and the centre 9:16 crop. In the test suite, matching frames were 14 to 40 bits apart and unrelated video never came closer than 90.
3. One code per minute
Every second's sound and picture fingerprints are hashed into a leaf, and the minute's 60 leaves are combined into a Merkle root. The fingerprint files are stored publicly off-chain; the root on Monad is what makes them tamper evident, because changing one landmark changes the root.
4. Stamping with a passkey
The creator's passkey is evaluated through Mera with Clipright's own salt, sha256("clipright.stamp.v1"). The 32 bytes that come back become a signing key used only for stamps. The same passkey with a different salt would give an unrelated key, so this key is separate from any wallet.
The browser signs each minute's root. Clipright's relayer checks that the file really hashes to that root and that the signature comes from the stream's key, then submits it and pays the gas. The contract checks the signature again, refuses to overwrite a stamped minute, and refuses minute m until m minutes after the stream opened.
5. Checking a clip
The clip is decoded and fingerprinted in the viewer's browser. Then:
- Its sound hashes are compared with every stamped stream to find the offset most of them agree on.
- If the sound does not match, its pictures vote on an offset instead.
- Each second gets a sound count and a picture distance, shown as one coloured cell.
- For each matched minute, the browser re-hashes the fingerprint file, reads the root from Monad directly, and asks the contract's
verifySecondto check one second's proof onchain.
Why this matters
When nothing is on record
A no match is the honest answer for footage nobody stamped. The browser first sends the clip's sound landmarks, never the sound itself, to /api/leads. They are matched with the same offset histogram as stamped streams against clips someone already found a lead for, so a re-upload or re-crop of a known clip gets its lead at once. If the viewer asks for more, the server runs three lookups and keeps them apart:
- Google's Gemini gets 8 small frames and up to 30 seconds of 8 kHz sound. It writes down the spoken lines word for word and describes the scene. If Gemini is busy or out of free quota, Whisper on Groq writes down the speech instead, with no scene description.
- Each line is searched as an exact phrase on Wikiquote, an open catalog of film and TV dialogue. A hit links to the page that quotes it.
- The middle frame is sent to trace.moe, which finds anime episodes and the minute; only matches above 92% similarity are shown.
Why the AI guess is labelled unverified
6. Reading the record
The list of streams and the "stamped first" ordering come from the registry's events. Monad's public RPC answers eth_getLogs for at most 100 blocks at a time, about 30 seconds of history, so Clipright reads the full history through Envio HyperSync.
Measured numbers
| What | Value | Source |
|---|---|---|
| Block time | 300 ms | Monad docs; 0.302 s measured over 20,000 testnet blocks |
| Finality | After two blocks, 600 ms | Monad docs |
| Cost of one stamp | 0.0107 MON | A real testnet stamp: 104,982 gas at 102 gwei |
| A six-hour stream | 360 stamps, about 3.85 MON | About $0.10 to $0.11 at MON $0.027 to $0.029 |
| Offset accuracy | Within 3 ms on the test clips | 47.297 s found for a clip cut at 47.3 s |