Skip to content

Instantly share code, notes, and snippets.

@edmorais
Created May 22, 2014 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edmorais/c35358373db239f8e9b0 to your computer and use it in GitHub Desktop.
Save edmorais/c35358373db239f8e9b0 to your computer and use it in GitHub Desktop.
/*
* Player de dois vídeos em loop lado-a-lado
*/
import processing.video.*;
Movie video1, video2;
void setup() {
size(1024, 768);
background(0);
video1 = new Movie(this, "1.mov");
video2 = new Movie(this, "2.mov");
// os vídeos devem estar dentro de uma pasta chamada 'data' dentro da pasta do sketch
video1.loop();
video2.loop();
}
void draw() {
image(video1, 24, 154, 480, 360);
image(video2, 520, 154, 480, 360);
// var. vídeo, x, y, largura, altura
}
// Called every time a new frame is available to read
void movieEvent(Movie m) {
m.read();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment