Reference for Processing version 1.1+. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, »please let us know. If you prefer a more technical reference, visit the »Processing Javadoc.

Name

MovieMaker

Examples
import processing.video.*;

MovieMaker mm;  // Declare MovieMaker object

void setup() {
  size(320, 240);
  // Create MovieMaker object with size, filename,
  // compression codec and quality, framerate
  mm = new MovieMaker(this, width, height, "drawing.mov",
                       30, MovieMaker.H263, MovieMaker.HIGH);
  background(204);
}

void draw() {
  ellipse(mouseX, mouseY, 20, 20);
  mm.addFrame();  // Add window's pixels to movie
}

void keyPressed() {
  if (key == ' ') {
    mm.finish();  // Finish the movie if space bar is pressed!
  }
}
Description This class can be used to create a QuickTime movie from a Processing program while it's running. Different parameters to the constructor allow the movie to be created at different sizes and formats. Everytime the addFrame() function is run, a new frame is added to the movie. The finish() function is necessary to finish and save the movie file.
Methods
addFrame() Adds a new frame to the video
finish() Finishes and saves the video file
Constructor
MovieMaker(parent, width, height, filename)
MovieMaker(parent, width, height, filename, fps)
MovieMaker(parent, width, height, filename, fps, type, quality)
MovieMaker(parent, width, height, filename, fps, type, quality, keyFrameRate)
Parameters
parent PApplet: typically use "this"
width int: width of the movie
height int: height of the movie
filename String: name of the movie
fps int: frames per second
type Either ANIMATION, BASE, BMP, CINEPAK, COMPONENT, CMYK, GIF, GRAPHICS, JPEG, MS_VIDEO, MOTION_JPEG_A, MOTION_JPEG_B, RAW, SORENSON, VIDEO, H261, H263, H264
quality Either WORST, LOW, MEDIUM, HIGH, BEST, LOSSLESS
keyFrameRate int: number of key frames each second
Usage Application
Updated on June 14, 2010 12:05:23pm EDT

Creative Commons License