Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

MarceloAlves/Average-Movie-Images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages