Manual Errata: Brendan has advised me that his script actually captured video straight from DVD and not from Quicktime. I’ve updated the script with a comment to reflect this.
Script has been updated again, check to see that you have the most current version.
Below you’ll find a script that copies one frame for every second of a movie and creates a poster from the frames. Each line of frames represents one minute of the movie. 60 seconds, 60 images. I had lots of fun getting this to work and hope you have fun making your own movie posters. I used Handbrake to rip my DVDs in OS X, Windows uers can check out AutoGK.
I’ve FINALLY figured out how to get my version of Brendan Dawes’ Cinema Redux sketch (aka script) to run in Windows. Windows users, make sure you are using a recent version of Processing (Processing-0090 is the latest stable version) from processing.org and have the latest JRE (Java Runtime Environment) installed as well as Java for Quicktime (available through Quicktime 6.5.2’s Updater found in the Windows Start Menu).
Windows users MUST encode their video as Sorenson 1 video. Not Sorenson 3 or any other codec. I’ve tested several and Sorenson 1 is the only one that I’ve found that works. The video must be playable by Quicktime, too.
I should preface this by saying that I’ve borrowed Brendan’s idea AND some of his code in order to get this to work in Processing again. Brendan’s code no longer works with any of the currently available versions of Processing. Because I so badly wanted to make “movie DNA” for myself, I rewrote most of Brendan’s code. I added the new video functions and made the program a little smarter when it comes to stage size. Here’s Brendan’s code if you want to see exactly what I’ve changed.
Check out The Big Lebowski:

For you Mac OS X users, the script should run fine as well. Just download Processing (stable release 90 should be fine), run it, copy and paste the script into the sketch window and press the ‘play’ button. I like to use colorful movies… if you want the image to be higher or lower res, just change the VWIDTH and VHEIGHT values at the top of the script. Be careful, you’ll run out of memory fast if you make your frames too big.
Here’s The Machinist:

Please let me know any successes or failures in the comments. Have fun and thank Brendan, too!
One more thing, make sure you put your Quicktime movies inside the folder where your Processing application is. Your final image will be saved to the folder where your sketch resides.
Here’s the script, as promised. DON’T COPY AND PASTE THE SCRIPT BELOW, the HTML is screwing up the code. Here’s a link to a text file containing the code. Copy from there instead.
//The original Cinema Redux script was written by Brendan Dawes. This script has been adapted from his work.
//Brendan’s version captured frames from DVD using an analog input, this version captures frames directly from Quicktime video
import processing.video.*;
Movie myMovie;
int xpos = 0;
int ypos = 0;
int VWIDTH = 11; // width of capture
int VHEIGHT = 6; // height of capture
int MOVIEWIDTH = VWIDTH * 60; // width is equivalent to 1 minute of film time
int MOVIEHEIGHT;
int MAXWIDTH = MOVIEWIDTH – VWIDTH;
float MOVIEDURATION;
void setup() {
myMovie = new Movie(this, “movie.mov”); //change movie.mov to the filename of your Quicktime movie
MOVIEDURATION = (myMovie.duration()); // gets the duration of the movie in seconds
MOVIEHEIGHT = VHEIGHT * int(MOVIEDURATION / 60) + VHEIGHT; // height of the stage is based on the length of your film
// note that the last frame of the film will repeat until it reaches the end of the current line
size(MOVIEWIDTH, MOVIEHEIGHT);
background(0); // sets the background of the stage to black
framerate(1); // forces the video to play at one frame per second
myMovie.play();
}
void draw() {
if(myMovie.available()) { // checks to see if the next frame is ready for processing
myMovie.read();
image(myMovie, xpos, ypos, VWIDTH, VHEIGHT);
xpos += VWIDTH;
if (xpos > MAXWIDTH) {
xpos = 0;
ypos += VHEIGHT;
}
if(ypos > MOVIEHEIGHT) {
saveFrame(“my_movie_dna.tif”); // saves a tiff image to the folder of the current sketch when the end of the movie is reached
delay(2000); // pauses two seconds to save the file
noLoop(); // exits the draw loop so that the process ends
}
delay(100); // waits one tenth of a second before repeating the draw function
}
}
______________________
Some things that still need working on:
-Want to make the stage size dynamic based on the length of the movie (UPDATE: DONE! See above.)
-Want to figure out how to get it to work properly on Windows (maybe work without Quicktime somehow)

{ 2 trackbacks }
{ 118 comments… read them below or add one }
← Previous Comments
Okay Cale, I’m not sure why there’s no TIFF file being saved out. Have you checked the folder where your Processing executable resides. The newer versions of Processing (91 or greater) seem to be saving files to the same folder as the executable (although the documentation claims otherwise). Also, let Processing run for a full minute after the final line is reached.
I tried the script in the newest version of Processing (97) and it worked for me, however the TIFF file wasn’t where I expected it to be.
Your best bet is to do a search for my_movie_dna.tif on your hard drive. I can almost guarantee that it’s being saved somewhere on your drive.
You’re real close, and I think the work will be worth it once you see the results!
nice Scott.
Brian,did you clear ["quicktime.std.movies.movie" was not found ]problem?
I was in same error before.
I was anaware using a java included version of processing.
Hey Scott – or anyone for that matter.
I can get small test movie files to work – and spit out the .tiff – but when I try a full-length movie, it runs for about an hour and then gives me a “java.lang.OutOfMemoryError”
Any clues on how I can avoid this? I only have 512mb of RAM on this machine – but with the page file it can easily go up to about 900mb. Surely this little thing isnt THAT RAM intensive…
Thanks for your help!
Daryl
Daryl, are you working on a PC or a Mac? Also, have you tried bumping down the scale of each snapshot. About how wide and tall would you say your final output is?
Have you tried lowering the framerate of your source movie?
And my solution if all else fails… use Quicktime Pro or MPEG Streamclip to chop your movie into two halves, possibly exporting each half as a smaller movie 320 x 240 (or smaller) with fewer frames per second (I think 5 fps is the lowest you can do) and no sound.
Then, after you run Cinema Redux, paste the two images together in Photoshop (or Gimpshop!)… you’re going to lose as much as 59 seconds of movie if you do this, though.
Let me know if that helps. Thanks for your interest in Cinema Redux, and thank Brendan Dawes while you’re at it! I wish I had thought of it first. It’s brilliant.
-Scott
Thanks for your help! I pretty much did that already (after posting asking for help, of course). And this is what was given back to me.
http://www.imaslacker.net/dna.jpg
Lots of blank/black frames. I had the video encoded as Sorenson – but I am in the process of running redux on a Sorenson3 format – since I read someone had better luck with that.
Daryl,
Looks like you’re using a PC, not a Mac. Is that correct?
You’re definitely capturing video at too high a res. I’ve ran into problems capturing large ‘recognizable’ frames. If you can make out faces and things, you’re probably capturing too much per second. That’s why you’re getting black frames. The computer doesn’t have time to see the frame, capture it and then see the next frame.
I personally may try to rejigger the script so it plays video at half speed, maybe giving your processor a chance to see and capture one frame per second at high resolutions. But, I’m working on another hack right now (Gimpshop) and won’t have time to take a look at it.
Also, your final image is more than 4000 pixels wide and high (uncompressed, mind you). This is definitely why you’re getting out of memory errors. Scale down your frames and your final image will definitely be smaller, although sadly, not as printable (which I’m assuming is your goal).
I have Fight Club on DVD AND a Mac AND a GB of RAM. I’ll take a stab at a high res image for you and will post it here when it’s done… sometime tonight.
In the meantime, scale down your frame sizes (VWIDTH & VHEIGHT) to something like 20 x 15 and see how that works.
I’m considering implementing forums on my site so we can tackle and troubleshoot problems like yours. Thanks for the inspiration!
Good luck!
-Scott
well – the sorenson1 and sorenson3 both came out exactly the same with the same number of black frames.
anybody got any clues?
i take that back – i think the sorenson1 came out with a few more good frames than the sorenson3.
i just dont understand why its doing that with all the black frames.
Daryl, are you on a PC? Did you scale down the VWIDTH and VHEIGHT parameters?
I am on a PC – sorry I didnt answer that previously
by “scale down” what do you mean – i scaled them down to be about 30px high… kept the same aspect ratio so I didnt get distortion… etc
im so tired lol. stayed up all night goofing with this thing… i wish it were easier.
Hey Daryl, your VWIDTH should be at most 25 or 30 pixels. Processing can’t handle capturing frames much bigger. For Fight Club, use 30 for your VWIDTH and 15 for your VHEIGHT. That should let the computer capture all the frames, not just every fifth frame.
I’m finishing Fight Club right now, and I think you’ll like it. It looks really good.
Processing can be very picky and very memory intensive. I’d like to capture super hi-res images to print, but it’s going to take some time to figure out.
As of right now, the final Fight Club image is going to be nearly 2000 pixels wide. That should be fine for printing a decent-sized poster.
-Scott
Who loves you, Daryl? Answer: Telly Savalas and me.
Download the Fight Club DNA here. 14.2 MB File!
This sucker’s big, so right click the link above and Save As. Don’t view it in your browser, it might crash it.
-Scott
PS. Thanks for the kick in the pants to update the script. I figured out why the TIFFs aren’t being saved out. The script has been updated to fix this issue. Sorry guys, they changed one of the functions and added one.
-Scott
Scott – you are officially the man. Thanks a ton for that Fight Club DNA!
I am about to try it again on my own – just because I like to learn to fish instead of be given a fish – with smaller image dimensions. Thanks a ton for your input – and Ill let ya know how it turns out!
Daryl
Hi
I got a little problem running the script.
Everything works except that I got only one single line for the tif file.
What settings do I have to change or what do I wrong.
I triend different width + height settings 11/6 to 220/120 and different framepersecond values.
The movie I tried is from apple : 1984.mov (a commercial)
I used this for test purposes.
I work on WindowsXP; processing 0135 beta
thanks for help
Comparison of selected photo mosaic software
http://www.aolej.com/mosaic/compare.htm
I know this is the first comment in a really long time on this post, but I’d just like to report in. I’m pleased to see that even through many new iterations of Processing that this script still works, at least on my testing environment (OS X 10.5.2). The only thing that has changed is that the command “framerate” is now “frameRate” in the Processing framework.
I also wanted to say that even though Scott said numerous times in the comments to limit the size of the frames you use out of respect to system memory usage, but I was able to increase the frame size to around 120×50 for a 2.39:1 anamorphic film. This makes the ending resolution suitable for making a large print of around 30″ by 20″. It’s actually really easy to achieve. Just go into Processing’s preferences and increase the memory cap to something more reasonable for this type of project. I set it to 1GB. That still isn’t quite enough to do what we need to, so what I have done is split the movie files into 20-minute segments using QuickTime Pro. If you are exact enough with the frames, stitching everything together is seamless. I’m finishing up a nice poster of the Blade Runner Final Cut, and I’ll link to it when I’m done.
Here’s the DNA for Inland Empire.
Hi,
Thank you for the script and program! I am trying to run Process but I keep getting error message:
An OutOfMemoryError means that your code is either using up too much memory
because of a bug (e.g. creating an array that’s too large, or unintentionally
loading thousands of images), or that your sketch may need more memory to run.
If your sketch uses a lot of memory (for instance if it loads a lot of data files)
you can increase the memory available to your sketch using the Preferences window.
Exception in thread “Animation Thread” java.lang.OutOfMemoryError: Java heap space
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:70)
at processing.core.PApplet.loadBytes(PApplet.java:4163)
at processing.core.PApplet.loadBytes(PApplet.java:4146)
at processing.video.Movie.init(Movie.java:176)
at processing.video.Movie.(Movie.java:101)
at processing.video.Movie.(Movie.java:89)
at sketch_jun03a.setup(sketch_jun03a.java:31)
at processing.core.PApplet.handleDraw(PApplet.java:1403)
at processing.core.PApplet.run(PApplet.java:1328)
I increased the file size to 1000MB and still getting same message. I have kept the script same as yours only changing the file name.
Please help!
Many thanks,
Genevieve
← Previous Comments