Update: Much has changed in the months since I originally wrote this post. Go ahead and read this but you can get newer information by reading about the State of Frinkiac.

Frinkiac. It’s a website that’s simple yet ingenious and it fits right in the palm of your hand.

Aw, the waiting game sucks. Let’s play hungry hungry hippos!

Today I’m pleased to finally talk publicly about a side project Sean Schulte, Allie Young, and I have been working on: Frinkiac.

Frinkiac is a search engine for Simpsons quotes. It contains nearly 3 million screenshots (every episode from season 1 through 15) indexed by the quote they are associated with and has a variety of features to help you find the exact screenshot you’re looking for. Once you’ve found it you can share it with your friends or make a quick meme. Never again find yourself wishing you could pinpoint the second his heart rips in half. You’ll feel like god must feel when he’s holding a gun.

The Simpsons is one of greatest television comedies of all time and we hope that having ready access to the perfect screenshot will make people laugh and remind them to rewatch their favorite episodes.

Now, let’s all get drunk and play ping-pong!

Some Technical Details

Ever heard of a little thing called the internet?

frinkiac parses episodes and generates screen captures. It attempts to determine what are relevant screens to capture in a fairly naïve way:

Cut the scene into 100 equal-size buckets.

Take the average color of each bucket.

Compare that color to the corresponding bucket from the previously-saved image.

If the total difference is large enough, save the image.

Continue until all the frames of the episode have been inspected.

The code is written in Go and the video parsing is done with cgo+ffmpeg.

We also parse subtitle files and correlate each subtitle line’s timecode with the timecode of the screenshot. Finally, the frinkiac binary can upload the data set to frinkiac-server .

frinkiac-server is also written in Go. It uses gorilla/mux as the router, React for the frontend, and indexes the quotes and screenshot metadata in PostgreSQL.

The index is constructed by taking the words from each subtitle and breaking them into prefixes (with a minimum length of two characters). So when you start searching you can get instantaneous results: typing “ill” is a prefix for “illegal”, “illegitimate”, and “ill-gotten”.

The more you type, the more accurate your search becomes. For example, “kill anyone who looks” isn’t accurate enough to find Rex Banner, so keep typing, “kill anyone who looks at me cockeyed” to find the scene. Of course … it turns out that was the only scene in which the Simpsons ever said “cockeyed”.