OPENCV



Name movie()
Examples movie
import hypermedia.video.*;


OpenCV opencv;

void setup() {
  size( 640, 480 );
  opencv = new OpenCV( this );
  opencv.movie( "bunny.avi", width, height );    // load movie file
}

void draw() {
  opencv.read();                  // read a new frame
  image( opencv.image(), 0, 0 );  // and display image
}

void mousePressed() {
  float time = mouseX/float(width);
  opencv.jump( time );            // jump to a specified frame
}

Description Allocate and initialize resources for reading a video file from the specified file name.
Movie must be located in the sketch's data directory, otherwise you must specified the full path to access to the movie file without an error.
notes : this method automatically updates previous memory allocation, sound will not be available

Supported codecs and file formats depends on the backend video library :

  • Video for Windows (VfW) for Windows users
  • FFMPEG on Linux
  • QuickTime for Mac OS X

For more information about video on OpenCV or about reading your video files on all platforms, see VideoCodecs

Syntax movie(filename);
movie(filename, width, height);
Parameters
filename String : the filepath of the movie file
width int : the width of the movie image
height int : the height of the movie image
Return None
Usage Application