This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software in the Help menu. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

Name

Movie

Examples
import processing.video.*;
Movie myMovie;

void setup() {
  size(200, 200);
  myMovie = new Movie(this, "totoro.mov");
  myMovie.loop();
}

void draw() {
  tint(255, 20);
  image(myMovie, mouseX, mouseY);
}

// Called every time a new frame is available to read
void movieEvent(Movie m) {
  m.read();
}

Description Datatype for storing and playing movies. Movies must be located in the sketch's data folder or an accessible place on the network to load without an error.
Methods
frameRate() Sets the target frame rate
speed() Sets the relative playback speed
duration() Returns length of movie in seconds
time() Returns location of playback head in units of seconds
jump() Jumps to a specific location
available() Returns "true" when a new movie frame is available to read.
play() Plays movie one time and stops at the last frame
loop() Plays a movie continuously, restarting it when it's over.
noLoop() Stops the movie from looping
pause() Pauses the movie
stop() Stops the movie
read() Reads the current frame
Constructor
Movie(parent, filename)
Parameters
parent PApplet: PApplet
filename String: String
Updated on January 1, 2021 03:38:10am EST