I have had a similar problem with OpenGL and MovieMaker. I tried all sorts of stuff. In the past, 0138 and before, I was able to remedy the situation by creating the MovieMaker object before calling size and giving it explicit width and height values, like this:
Code:
void setup() {
mm = new MovieMaker(this, 720, 480, "drawing.mov",
30, MovieMaker.JPEG, MovieMaker.HIGH);
size(720, 480, OPENGL);
}
I don't know why this worked but it did and I just used it that way. I never got around to seeing why. This doesn't work anymore. Here is a short sketch I wrote to test it:
Code:
import processing.video.*;
import processing.opengl.*;
MovieMaker mm;
void setup() {
println("About to call size()");
//size(720, 480);
size(720, 480, OPENGL);
println("About to create mm");
mm = new MovieMaker(this, 720, 480, "drawing.mov", 30, MovieMaker.JPEG, MovieMaker.HIGH);
colorMode(HSB, 100);
background(0, 0, 0);
}
void draw() {
background(100-(frameCount%100), frameCount%100, 100);
if (frameCount > 100) {
mm.finish();
noLoop();
} else {
mm.addFrame();
}
}
When I run this I get some disturbing output:
Code:
About to call size()
About to call size()
About to create mm
Also, it freezes while creating mm. And why does it print out "About to call size()" twice!!! Now, when I change setup() to look like this:
Code:
void setup() {
println("About to create mm");
mm = new MovieMaker(this, 720, 480, "drawing.mov", 30, MovieMaker.JPEG, MovieMaker.HIGH);
println("About to call size()");
//size(720, 480);
size(720, 480, OPENGL);
colorMode(HSB, 100);
background(0, 0, 0);
}
It actually runs but gives me this output:
Code:
About to create mm
About to call size()
About to create mm
The movie file already exists. Please delete it first.
About to call size()
Also, the movie file it creates is broken. This is after I have deleted any previous version of drawing.mov from the sketch folder and even emptied it from the Trash. It is starting to seem like it is calling setup() twice?
As for it not working with P3D, I haven't had that problem. I get this output when using P3D in a regular manner:
Code:
About to call size()
About to call size()
About to create mm
but it works correctly. Until this issue is resolved, I would use P3D and try at a bunch of the encoding and quality options:
http://processing.org/reference/libraries/video/MovieMaker.html
It may be an encoding issue.