Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Average Movie Images

Inspired by this reddit thread, this script will take all images from a movie, grab each pixel RGB value, add them together then take the average and create a final image like this:

Frozen

The Great Gatsby

Requirements

How-To

  1. Generate frames from selected video using FFmpeg

    ffmpeg -i input_file.mp4 -r 1 -f image2 images/images_%20d.png

    Notes: -r 1 Generates 1 frame per second. Modify to your liking.

  2. Run the script ruby images.rb

  3. Grab a beer. It's going to be a while.

  4. Check out your newly generated final.png.

Other Stuff

There's probably a better way to do all of this (like RMagick's average) but I wanted to give it a shot. Any help making this script better would be appreciated!

About

Average all images from a movie

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages