View on GitHub

Movie Barcodes

Turn video files into 'barcodes' where vertical lines represent the average colour of individual frames.

Download this project as a .zip file Download this project as a tar.gz file

Movie Barcode Generator

github-bighero6

Turn video files into 'barcodes' where vertical lines represent the average colour of individual frames. Example album. Uses code published by zulko.

Requirements:

Usage:
python process_video.py inputfile width height
e.g.
python process_video.py bigbuckbunny.mp4 320 180

Tips:

Details:

You may have seen sites like moviebarcode, The Colors of Motion or the Movie Barcode Generator. In short, they compress a movie into a single image, with vertical lines representing the average colours of sequential frames. Ideally this gives a glanceable idea of the movie's colour palette.

While moviebarcode squashes each frame to a single pixel width (preserving some vertical gradients), this script uses a similar process to The Colors of Motion (a single colour per frame). First find the average RGB values of all pixels in a single frame:

github-process-1

And then to repeat the process for all frames:

github-process-2

This should work with any movie file ffmpeg can handle (though in practice I've only tested it with mp4 files).

Quibbles:

(Images: Big Buck Bunny)