Skip to content

Instantly share code, notes, and snippets.

@ipa
Created October 1, 2011 09:57
Show Gist options
  • Save ipa/1255826 to your computer and use it in GitHub Desktop.
Save ipa/1255826 to your computer and use it in GitHub Desktop.
how to create a movie with processing
import processing.video.*;
int width = 200;
int height = 200;
int frames = 18;
String filename = "example.mov";
MovieMaker mm;
void setup(){
size(width, height);
mm = new MovieMaker(this, width, height, filename,
frames, MovieMaker.H263, MovieMaker.HIGH);
frameRate(18);
}
void draw(){
// draw some stuff
// add the frame to the movie
mm.addFrame();
}
void keyPressed() {
// publish the movie
if (key == ' ') {
mm.finish();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment