processing / processing-video

GStreamer-based video library for Processing
276 stars 130 forks source link

myMovie.time() returns incorrect value #210

Open illusionmanager opened 1 year ago

illusionmanager commented 1 year ago

I'm having trouble with looping the video. the loop() call itself doesn't work, and the workaround if (m.duration() - m.time() < 0.05) { m.jump(0); } seems unreliable. I had to increase the value to 0.15 to make it work and then the loop isn't even seamless. So instead of using a movieEvent() to read the frame, I thought perhaps loop() works when using available() and read() inside the draw() function. It doesn't help. So for debugging purposes I added println (myMovie.time(). At the end of the movie it keeps printing 20.02. However sometimes it prints -1.0E-9. That might be the systems attempt to loop the movie, but clearly it is wrong and doesn't work.

illusionmanager commented 1 year ago

interesting enough the duration() reports 20.096 but the time stops increasing at 20.02 (the movie itself has 29.97 fps). does it stop reading before the actual end is reached??