Closed clankill3r closed 1 year ago
I have the same issue. If I use a small movie file (~50mb) it will loop, but a larger file (~500mb) just stops at the end.
`Movie vid;
void setup() { fullScreen(); vid = new Movie(this, "jose.mp4"); vid.loop(); }
void draw() { background(0); image(vid, 0,0, width, height); }
// Called every time a new frame is available to read void movieEvent(Movie m) { m.read(); }`
As a workaround you can use this:
boolean is_movie_finished(Movie m) {
return m.duration() - m.time() < 0.05;
}
and if so, use mov.jump(0);
This problem still occurs with processing-video release 10 (2.2). And the workaround above still works as well.
I'm seeing this issue with files as small as 28MB, on M1 Silicon & an older mac laptop. The workaround described above works great for me!
Is this something that's still happening with the latest version of the library (2.2.x)?
Is this something that's still happening with the latest version of the library (2.2.x)?
I thought it was still broken, but I just tested several different size/length videos with the latest video library (2.2.1), and looping does seem to work now! I'm on Windows 11 & the latest Processing core
@cacheflowe Great news, thanks for confirming!
Unfortunately .loop()
is broken on my setup, Processing 4.1.3, Video v2.2.2, Apple M1, Macos 12.5.1.
Using the code above worked to loop once I disabled the movie.loop()
code.
if (movie.available()) {
movie.read();
if (is_movie_finished(movie)) {
movie.jump(0);
}
}
Same problem occurs to me with mp4 format only.
I've add this before setup() : boolean is_movie_finished(Movie m) { return m.duration() - m.time() < 0.05; }
And this to the draw() loop :
if (is_movie_finished(movie)) { print(is_movie_finished(movie), "movie finished"); movie.jump(0); }
I have a movie and it does not loop. Since the code is compiled without the sources and I have no spare time atm I can't look into it. I do now that
movie.available()
returns false at the end of the video.I see if I can upload the video later.
OSX 10.15.7