diff --git a/java/libraries/video/src/processing/video/Movie.java b/java/libraries/video/src/processing/video/Movie.java index 8f15cdc6e..e54045517 100644 --- a/java/libraries/video/src/processing/video/Movie.java +++ b/java/libraries/video/src/processing/video/Movie.java @@ -292,6 +292,12 @@ public class Movie extends PImage implements PConstants { initSink(); } + // Round the time to a multiple of the source framerate, in + // order to eliminate stutter. Suggested by Daniel Shiffman + float fps = getSourceFrameRate(); + int frame = (int)(where * fps); + where = frame / fps; + boolean res; long pos = Video.secToNanoLong(where);