Hi,
I’m building a video player based on GlVideo (Ubunut Linux 16.04 Processing 3.4) and I encounter a problem with the video.jump(float) function. The video seems to strangely fall down to fixed positions (8,3s, 16,6s, 24,9s, etc…) depending on the duration of the file.
My code was a bit tricky with ControlP5 progress bars and stuff and to remove any interference, here a simple code based on single video example that shows the same problem :
import gohai.glvideo.*;
GLMovie video;
void setup() {
size(320, 240, P2D);
video = new GLMovie(this, "launch1.mp4");
video.loop();
}
void draw() {
background(0);
println (video.time());
if (video.available()) {
video.read();
}
image(video, 0, 0, width, height);
}
void mousePressed() {
video.jump(14.0);
}
This code results in a jump to 9.8765335 instead of 14.0…
If I use video.jump(11.0);
It’s the same… Jumps to 9.8765335
But If I use values under 9.0, the jump works perfectly well…
If anyone could explain this limitation, I would be glad!
Thanks by advance,
Fabrice.