muchos gracias.. well i got it to work partially, so to say :)
i like it how it looks, now the image kind of flickers on top of the video, which is not bad either.
But I still need to figure out how to tell the program to display image fully after the playback
i like it how it looks, now the image kind of flickers on top of the video, which is not bad either.
But I still need to figure out how to tell the program to display image fully after the playback
import processing.video.*;
Movie myMovie;
PImage fragment;
int rand;
void setup() {
size(640, 480);
myMovie = new Movie(this, "swan-1.mp4");
myMovie.play();
rand = int(random(0,9)); //HERE YOU CHOOSE BETWEEN 10 DIFFERENT IMAGES
takerandomimage("frag_" + nf(rand, 3) + ".jpg"); //CALL YOUR FUNCTION 'takerandomimage'
//REMEMBER TO NAME YOUR IMAGES "frag_000.jpg"
}
void draw() {
image(myMovie, 0, 0);
}
void movieEvent(Movie m) {
m.read();
if (myMovie.available())
myMovie.read();
else image(fragment,0,0);
}
// THIS IS THE FUNCTION
void takerandomimage(String fn) {
fragment = loadImage(fn); //LOAD RANDOM IMAGE
image(fragment,0,0);//DISPLAY RANDOM IMAGE
}