Post-processing GSVideo videos.
in
Contributed Library Questions
•
8 months ago
A moment ago I posted this topic, and even though this question is kind of related, I think this needs its own thread.
This is a simple question with probably an equally simple solution.
I've been trying to post-process my GSVideos, to minimize dropped frames, by using loadPixels(); to place objects containing those pixels into an ArrayList, and then in the end using a for loop to add them one by one to the movie maker object... like this:
So I might be going about this entirely wrong, anyone got any ideas?
Bjørn
This is a simple question with probably an equally simple solution.
I've been trying to post-process my GSVideos, to minimize dropped frames, by using loadPixels(); to place objects containing those pixels into an ArrayList, and then in the end using a for loop to add them one by one to the movie maker object... like this:
- ArrayList movie_images = new ArrayList();
- GSMovieMaker mm;
- void setup() {
- mm = new GSMovieMaker(this, width, height, "drawing.ogg", GSMovieMaker.THEORA,
- GSMovieMaker.BEST, fps);
- mm.setQueueSize(50, 10);
- }
- void draw() {
- loadPixels();
movie_imgs.add(new movie_img(pixels)); - }
- void keyPressed() {
- if (key == ' ') {
- mm.start();
- for (int i = 0; i < movie_imgs.size(); i++) {
- movie_img mi = (movie_img) movie_imgs.get(i);
- mm.addFrame(mi.colors);
- }
- mm.finish();
- exit();
- }
- }
- class movie_img {
- color[] colors;
- movie_img(color[] col) {
- colors = col;
- }
- }
So I might be going about this entirely wrong, anyone got any ideas?
Bjørn
1