Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Problem with movie freezing when using movie.jump()

$
0
0

Hi, I created a sketch that makes my movie jump based on a list of time positions. Sometimes the transition is fast, but sometimes the movie freezes for a while. Here is the result:

Is there any way to reduce this delay?

Here is part of the code:

void draw() {
  background(0);

  if (!isPlaying) {
    currSub = subs.get(subIndex);
    myMovie.jump(currSub.start);
    isPlaying = true;
  }

  image(myMovie, 0, 0, width, height);

  //Draw subtitle
  text(currSub.speech, width/2, height - 25);

  //Check subtitle ending
  if (myMovie.time() >= currSub.end) {
    subIndex ++;
    isPlaying = false;
  }
}

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

thanks,


Viewing all articles
Browse latest Browse all 2896

Trending Articles