From the monthly archives:

July 2005

Someone asked, “Can I capture short movies (music videos) with Cinema Redux?”

Of course!

“Can I make the poster and the frames bigger so you can actually see what’s going on?”

Of course!

Here’s a good example (a NIN video from nin.com)

Click for larger image

You will have to change the code a little, though. Do not copy the code in this post, it is partial and will not work as is.

An excerpt with some explanation:

import processing.video.*;
Movie myMovie;
int xpos = 0;
int ypos = 0;
int VWIDTH = 40;

40 is the width of each frame. when you increase this, increase VHEIGHT proportionally or you’ll stretch out your frames

int VHEIGHT = 30;

30 is the height of each frame. when you increase this and VWIDTH, you make your entire image bigger

int MOVIEWIDTH = VWIDTH * 10;

10 is how many seconds of video goes on each line, if you have a short movie, make this number lower. Ultimately, this along with the width and height of each frame will decide exactly how wide and high your poster will be.

void setup() {

MOVIEHEIGHT = VHEIGHT * int(MOVIEDURATION / 10) + VHEIGHT;

Make this number match exactly the number up top that dictates the number of frames (in this case, 10) that goes on each line

The numbers above reflect my settings for creating the NIN poster here.

{ 19 comments }

Cinema Redux Redux

7/25/2005

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)

{ 120 comments }

Control Video with Play-Doh

July 23, 2005

Brendan Dawes is using MAX/MSP+JITTER and some Play-Doh to control the play speed of a video clip.
Originally, I assumed Brendan was using Processing, but I was mistaken. Thanks for the correction, Brendan!

Link!
I’m a big fan of Processing and actually used it recently to update one of Brendan’s scripts so that it runs on [...]

Read the full article →

Listen to Me and Kevin Pereira Tonight

July 22, 2005

We’ll be video and audio casting tonight. You can get all the links and info at Kevin’s site. We’ll be using Shoutcast and the link will show up on Kevin’s site as well. I’m almost positive that Mac users can get in on the fun by opening the Shoutcast stream in iTunes.
We’ll be live, so [...]

Read the full article →

Listen Up!

July 20, 2005

Don’t know what to TiVo?
One of my very good friends, ex-Screen Savers intern Mike Davis has a podcast that I think you’ll enjoy. It’s a podcast about TV. If you like TV as much as I like TV, this is the podcast for you. They recommend some great shows. Check it out!
You can listen and [...]

Read the full article →

Behind the Scenes at G4 (where I work)

July 17, 2005

I probably should post this to the show blog, but I can’t login to post from home because I don’t remember my password (ever – for anything).
Anyway, MAKE Magazine’s Phillip Torrone was on Attack of the Show! on Friday and he snapped some shots as I gave him the unofficial $2 tour. Here’s Phillip’s Flickr [...]

Read the full article →

I Wrote Some Stuff

July 8, 2005

I wrote some articles on the Attack of the Show! website. This is what I get paid to do. Well not just the articles. The stuff’s gotta play on TV, too.
This one’s about playing videos on your iPod
This one’s about legal online music downloads
UPDATE: Our show’s website is acting dodgy right now. So maybe click [...]

Read the full article →

This Was Fun!

July 6, 2005

Found this while crawling through Jeff Bridges’ amazing site. The Dude abides.
Basically, you gotta keep those things from touching the water. More stuff drops down and more hangers. You gotta keep rearranging and whatnot. I’m easily amused.

Read the full article →

Hackers Can Be Bad

July 1, 2005

Why would anyone want to hack the good guys over at the iPod Linux project? Hopefully it comes back online soon – I’m trying to get some work done.
If they pulled this off because of a Wiki security hole, then the other Wikis aren’t safe either.

Read the full article →