|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object processing.video.MovieMaker
public class MovieMaker
Library to create a QuickTime movie from a Processing pixel array.
Written by Daniel Shiffman.
Thanks to Dan O'Sullivan and Shawn Van Every.
Please note that some constructors and variable names were altered
slightly when the library was added to the Processing distribution.
// Declare MovieMaker object MovieMaker mm; 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(160, 32, 32); } void draw() { stroke(7, 146, 168); strokeWeight(4); // Draw if mouse is pressed if (mousePressed) { line(pmouseX, pmouseY, mouseX, mouseY); } // Add window's pixels to movie mm.addFrame(); } void keyPressed() { // Finish the movie if space bar is pressed! if (key == ' ') { mm.finish(); } }
Field Summary | |
---|---|
static int |
ANIMATION
|
static int |
BASE
|
static int |
BEST
|
static int |
BMP
|
static int |
CINEPAK
|
static int |
CMYK
|
static int |
COMPONENT
|
static int |
GIF
|
static int |
GRAPHICS
|
static int |
H261
|
static int |
H263
|
static int |
H264
|
static int |
HIGH
|
static int |
JPEG
|
static int |
LOSSLESS
|
static int |
LOW
|
static int |
MEDIUM
|
static int |
MOTION_JPEG_A
|
static int |
MOTION_JPEG_B
|
static int |
MS_VIDEO
|
static int |
RAW
|
static int |
SORENSON
|
static int |
VIDEO
|
static int |
WORST
|
Constructor Summary | |
---|---|
MovieMaker(PApplet p,
int _w,
int _h,
java.lang.String _filename)
Create a movie with the specified width, height, and filename. |
|
MovieMaker(PApplet p,
int _w,
int _h,
java.lang.String _filename,
int _rate)
Create a movie with the specified width, height, filename, and frame rate. |
|
MovieMaker(PApplet p,
int _w,
int _h,
java.lang.String _filename,
int _rate,
int _codecType,
int _codecQuality)
Create a movie with the specified width, height, filename, frame rate, and codec type and quality. |
|
MovieMaker(PApplet p,
int _w,
int _h,
java.lang.String _filename,
int _rate,
int _codecType,
int _codecQuality,
int _keyFrameRate)
Create a movie with the specified width, height, filename, frame rate, codec type and quality, and key frame rate. |
Method Summary | |
---|---|
void |
addFrame()
|
void |
addFrame(int[] _pixels,
int w,
int h)
|
void |
dispose()
|
void |
finish()
Close out and finish the movie file. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RAW
public static final int ANIMATION
public static final int BASE
public static final int BMP
public static final int CINEPAK
public static final int COMPONENT
public static final int CMYK
public static final int GIF
public static final int GRAPHICS
public static final int H261
public static final int H263
public static final int H264
public static final int JPEG
public static final int MS_VIDEO
public static final int MOTION_JPEG_A
public static final int MOTION_JPEG_B
public static final int SORENSON
public static final int VIDEO
public static final int WORST
public static final int LOW
public static final int MEDIUM
public static final int HIGH
public static final int BEST
public static final int LOSSLESS
Constructor Detail |
---|
public MovieMaker(PApplet p, int _w, int _h, java.lang.String _filename)
public MovieMaker(PApplet p, int _w, int _h, java.lang.String _filename, int _rate)
public MovieMaker(PApplet p, int _w, int _h, java.lang.String _filename, int _rate, int _codecType, int _codecQuality)
public MovieMaker(PApplet p, int _w, int _h, java.lang.String _filename, int _rate, int _codecType, int _codecQuality, int _keyFrameRate)
Method Detail |
---|
public void addFrame()
public void addFrame(int[] _pixels, int w, int h)
public void finish()
public void dispose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |