So recently I became intrigued with the audio waveform, the spiky bar you see on sites like SoundCloud, of some my favorite songs. It's a beautiful, raw depiction of music. It's gives you a quick and powerful insight into the sound. After an all night film binge on Netflix, I decided in a tired, popcorned haze to plot films in a similar manner. Instead of audio frequencies, the color profiles of select frames throughout the film would make for an interesting substitute. It was understood previous that no discernable insight could be made from the output, but pretty graphs you can hang on the wall. To just see the graphs, skip the below (I know that's what I would do).
Getting the data
Extracting the data was done through ffmpeg and Node.js, a decision I later regretted because there was much better APIs in other languages. However, I mustered on and developed a quick, streaming interface with ffmpeg. Once the script was together, I scraped through my (small) local film library of my favourites (and Scott Pilgrim vs the World), saved the color data and moved onto plotting.
Plotting the data
This bit was fun. Utilizing the extremely handy node-canvas, all the drawing is done with the brower's canvas API but with node. Once the grapher is created, each film is plugged into it and spit out into a folder, automatically. It's pretty sweet seeing them all fly out in their colorful way.
After some playful experimentation with different graphers, I found the waveform brightness graphs to be pretty much the most useless out of the three I produced. They showed barely any information about the film but I included them anyway because they look sorta cool. The most striking graphs were the "movie discs", as I like to call them. You can quickly see the main color scheme and dark/light points in the film. The beginning of the film is the outer ring and time continues inward. After the discs, you can see the the barcode graphs which are similar to the discs but with time progressing horizontally.
Thanks for reading
The code used to generate the data, plot the results and all the individual graphs are available here on Github. There was a ton more films I wanted to graph but I just don't have the internet connection or bandwidth to do it. Feel free to try it out at home with your favourites and submit a pull request.