Problem with movie freezing when using movie.jump()

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,

Tagged:

Answers

  • Hi gianordoli.

    This post is rather old, but there are not many out there about this. I hope you are still out there and see this. Did you find a solution to that issue. I'm experiencing the same issue.

    best regards, Gil

  • Hi Gil, someone suggested a trick I haven't tried yet, but I think it might work: having 2 Movie Players at the same time. While one is playing the current segment, the other has already jumped to the next. Then you could alternate them without having the lag. — you'd need to show/hide them as well, to display only the current playing one. I hope that helps. best,

Sign In or Register to comment.