it goes for a while then it freezes on one frame (usually 1 or 50) of the sampled video (Untitled.mov)...
I cannot understand where is the error.
It would be great if someone could help me!
It's a very simple code... when fCount arrives to frame 50 the speed is inverted (-) and changed (randomically). When it arrives another time to 1 the speed becomes (+) and change another time and so on... It should be like a cycle but at some point it freezes!
This is the code
import processing.video.*;
Movie myMovie;
int fCount = 0;
int fr = 25;
int firstRun = 1;
float chooseSpeed=1.0;
int choice = 0;
void setup() {
size(320, 240);
myMovie = new Movie(this, "Untitled.mov");
myMovie.loop();
}
void draw() {
if(fCount>49){
choice = 1;
chooseSpeed = random(-5.0,-0.5);
}
//firstRun checks if this is the first time that draw runs
While i start my sketch all goes fine in preview. But when i go to read the file some frames freeze, some part of the video is blocked... so i have problems...