Import whole video at once
in
Contributed Library Questions
•
2 years ago
I'm trying to import a whole video (that is, the pixels of all the frames) at once. I'm not interested in actually playing the movie, but it seems that all the available video libraries (core, gsvideo, ...) are very much focused on playback. What I'd like to have is a method for reading the video data which is independent of any framerate, i.e. a synchronous access. Some pseudo-code:
- Movie movie = new Movie(this, "somefile");
- for (int i = 0; i < movie.frameCount(); i++) {
- movie.loadFrame(i);
- movie.loadPixels();
- println("First pixel of frame " + i + " has color " + movie.pixels[0]);
- }
1