movie: audio delay

edited March 2018 in Library Questions

Hello everyone, everybody. I was trying to play a video using the video lib in processing but the video plays with a delay in relation to the audio. Can anyone help me solve this problem? Here is the code I'm using (simple). Thank you very much in advance.

import processing.video.*;
Movie myMovie;

void setup() {
  fullScreen(P2D, 1);
  myMovie = new Movie(this, "video2.mp4");
background(255);
  myMovie.play();
}

void draw () 
{
  if (myMovie.available ()) {
    myMovie.read ();
  }
  image (myMovie, 0, 0);
}

Sign In or Register to comment.