Truthy
A screenshot search engine for dialogue
Search any line of dialogue, land on the frame where it was said, and turn it into a meme, a GIF, or a multi-panel comic strip. It is the Frinkiac idea pointed at True Detective season one.
The pipeline behind it extracts frames from the source video, deduplicates near-identical ones, generates thumbnails, imports the subtitles, and builds a full-text index. SQLite triggers keep the index in step with the subtitle table, so re-importing captions never requires an index rebuild.
The subtitle alignment problem
This is the part that decides whether the whole thing works. Subtitle files are usually timed for a broadcast cut that opens with a “previously on” recap. If your video lacks that recap, every caption lands about a minute late — and the failure is quiet and maddening: search finds exactly the right line, and shows you the wrong frame.
Detection uses the title sequence as an anchor. Its cues are identical across episodes and present in both cuts, so whatever precedes it is the recap, and the difference is the offset. Crucially the detector declines rather than guesses when it can't find that anchor — including on a single film, where there is no sibling episode to compare against. Those get set by hand.
Subtitles can be reprocessed on their own, in seconds, because frames are unaffected by caption changes. Fixing an offset does not mean re-extracting a season.
The engine is content-agnostic
Everything site-specific lives in one config file: the name, the tagline, the attribution, the accent colour, what one unit of video is even called, and the list of videos. Re-targeting the engine at a different film or series is a config change rather than a fork.
With a single video and numbering switched off, the browse index and the search filter hide themselves and frames are labelled by title instead of an S01E05 slug — so the same codebase serves a film without looking like a series with one episode.
Fonts, the hard way
Caption text is drawn using an absolute font file path rather than a font name. ImageMagick builds without fontconfig have an empty font catalogue, and ffmpeg's drawtext filter is often missing entirely, so asking for “Impact” by name works on the development machine and silently produces nothing on the server. A resolver picks the first available of a short candidate list, and an environment variable forces a specific face.