A way of watching every scene in a 2 hour movie within 10 seconds.

This is a quirky script which takes a movie file, and renders the whole thing into a single animated gif where each frame comprises a montage of 30 frames from the movie.

This is an example of one such animation frame.

Click to see an example movie, using a 3x3 grid (340K)

Starting from the top left, you can watch each scene animate in turn, before watching the next sequence moving your from left to right and top to bottom. If a particular scene is uninteresting then move onto the next. Those able to achieve a state of zen consciousness can intake all frames at once.

By tweaking the script you can vary:

  • The number of images in each montage ( and )
  • The number of animation frames to comprise the gif ()
  • Animation speed ()

Technical reference

It uses a multi stage process, with each section completing before the next can begin.

  1. Get the movie images (0.png, 1.png, etc).
  2. Build each montage image (montage0.png, montage1.png, etc) using the original png's.
  3. Combine the montage images from step 2 into a single gif, with a matching file name.
The script has some comments within it, but can principally be run in one of two ways:

1. All-in-one solution, where the movie frames are extracted individually as they are needed. This is the most efficient on disc space (by only grabbing the images it needs), but can take a long time to process because of the seek time required by ffmpeg to grab those frames. Because this only grabs the frames you need, given the montage size and frame count, you must re-grab the frames if you change any of the parameters.

2. Use existing images. this requires a lot of disc space (~35 Gig for a 1.5 hrs) but gives a lot of scope to experiment with montage size and frame count. I rip these with:

ffmpeg -i A.Scanner.Darkly.avi  -f image2 temp_directory/%d.png
Note that some image extraction tools start numbering at 1, instead of 0. In which case, vary accordingly.

Authors comments

I have no idea if anyone finds this useful. I've certainly no idea if anyone would be able to watch a movie in this format and truly comprehend it.

This is a fully generalized solution to problem of creating visual previews of movies. By tweaking the script you can either render the movie as a single frame animated gif, or a single page montage of individual frames. Or, as by default, a combination of the two.

The use of mplayer was abandoned half way through development because it was so stupidly difficult to accurately get single frames from a movie clip.

It's a very Linux-specific script.

You might care to add a blank animation montage frame at the start/end of each loop as a hint of when to move on.

In reality, I suspect the only uses for this will be to catalog the scenes in pr0n!

If anyone has ideas on the audio, then let me know!


Images Copyright 2006 Warner Independent Pictures (WIP), used under terms of Fair Use.


Source code (perl - requires mplayer, ffmpeg, ImageMagick)
Example movie - single strip(128K)
Example movie - 3x3 grid (340K)
Example movie - 6x5 grid, 12 frames (3 MB)