We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › MovieMaker and OpenGL - Problem?
Page Index Toggle Pages: 1
MovieMaker and OpenGL - Problem??? (Read 4007 times)
MovieMaker and OpenGL - Problem???
Dec 23rd, 2008, 12:03am
 
I've been putting together a big set of visuals using OpenGL and am just trying to write it to a quicktime file, but it WON'T WORK!!

If I select P3D then a video file is written, but the colours are all messed up... so I really want to write the OpenGL output...

Help!! What am I doing wrong?

(Macbook, OS 10.4.11)
Re: MovieMaker and OpenGL - Problem???
Reply #1 - Dec 25th, 2008, 9:10pm
 
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.
Re: MovieMaker and OpenGL - Problem???
Reply #2 - Dec 26th, 2008, 9:47pm
 
I can confirm MovieMaker and OPENGL won't work together on OS X 10.5.6 and Processing 1.0.1
Re: MovieMaker and OpenGL - Problem???
Reply #3 - Dec 26th, 2008, 10:05pm
 
I am going to further investigate and test this problem. My guess is that it is a problem within MovieMaker and not OpenGL or Processing. I will keep you posted.
Re: MovieMaker and OpenGL - Problem???
Reply #4 - Dec 27th, 2008, 11:36am
 
Thanks for the confirmation of the 'weirdness'. Since the sketch was required for a gig later today (27th Dec) I tried the same sketch on my (older, slower) PC. And it worked as expected!!

So, it seems to be a Mac-specific issue - I'm happy to try any debug versions of MM if necessary...

Re: MovieMaker and OpenGL - Problem???
Reply #5 - Jan 15th, 2009, 7:58am
 
Hey namke, I found a quick fix for this on OS X:

I replaced video.jar in 1.0.1 with the video.jar from 0135. You can do this by right-clicking on Processing.app --> Show package content --> navigate to the Resources/Java/libraries/video folder. And replace it.

One other thing, try running the applet in "present" mode Sketch --> Present . That seemed to be the only way to work this for me.

you can get 0135 on the download page:
http://processing.org/download/index.html
Re: MovieMaker and OpenGL - Problem???
Reply #6 - Feb 8th, 2009, 1:04am
 
Try to use this line in setup after size()
Code:

hint(DISABLE_OPENGL_2X_SMOOTH);
Re: MovieMaker and OpenGL - Problem???
Reply #7 - Feb 11th, 2009, 12:06pm
 
I can confirm that disabling 2X OpenGL smoothing using hint() solves the issue on OS X 10.5.6 with Processing 1.0.1.

Thanks, Dimitre!
Re: MovieMaker and OpenGL - Problem???
Reply #8 - Feb 24th, 2009, 6:36pm
 
Yes!  The "hint(DISABLE_OPENGL_2X_SMOOTH);" line worked for me too.

Thanks
Re: MovieMaker and OpenGL - Problem???
Reply #9 - Feb 25th, 2009, 6:17pm
 
Anyone know how we can get MovieMaker to work without disabling the 2X smoothing?   It kind of makes it pointless to render to HD, with jaggies.
Re: MovieMaker and OpenGL - Problem???
Reply #10 - Feb 25th, 2009, 7:06pm
 
Okay, instead of disabling the 2X_SMOOTH, I tried this:

hint(ENABLE_OPENGL_4X_SMOOTH);

That seems to allow the MovieMaker file to work, and still retain the OPEN_GL smoothing (although I am suspect if it is really 4X as it does not appear that way.)
Re: MovieMaker and OpenGL - Problem???
Reply #11 - Feb 26th, 2009, 11:00am
 
Thanks for all of the responses/fixes to this - I have now filed a bug (since it does indeed look like a bug to me) - "Bug 1181"

Hopefully this'll be a simple fix to the MM library (although the workarounds listed here will do the job, it should be possible to use the MM library without them!)

john..
Re: MovieMaker and OpenGL - Problem???
Reply #12 - Apr 7th, 2010, 10:21am
 
I realized i had the same output error message just because
i put the code:
Code:
mm = new MovieMaker(this, width, height, "acqua.mov",
    30, MovieMaker.H263, MovieMaker.HIGH);


in the wrong place (inside a for cicle) !
nooooooooob!
Now everything works fine with the mm.

It even helped to check few compression standard types and MovieMaker.QUALITY value.

... don't always trust the compiler!

ps
4ver noob, don't trust me too!
Page Index Toggle Pages: 1