Hi,
I have some code to play a video with different soundtracks (or sometimes no sound) and I can't seem to get them in sync. The sound plays noticeably behind the video, maybe by about a third to a half of a second. Any ideas?
import processing.video.*;
import processing.sound.*;
Movie video;
SoundFile audio;
void setup() {
size(640, 360);
background(0);
video = new Movie(this, "test.mp4");
audio = new SoundFile(this, "test.mp3");
video.play();
audio.play();
}
void movieEvent(Movie m) {
m.read();
}
void draw() {
image(video, 0, 0, width, height);
}