Created
October 1, 2011 09:57
-
-
Save ipa/1255826 to your computer and use it in GitHub Desktop.
how to create a movie with processing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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