Is it possible to create a movie in *.mpeg, *.avi, etc. format by streaming the content of an OpenGl window into a file stream? This would be interesting for building a standalone demo of a game or an animation.
Jo.
Is it possible to create a movie in *.mpeg, *.avi, etc. format by streaming the content of an OpenGl window into a file stream? This would be interesting for building a standalone demo of a game or an animation.
Jo.
Technically, yes. But you’d probably find it a lot less hassle to find an external program to capture the screenbuffer directly - writing AVI or MPEG streams isn’t trivial, and would likely take some time.
Anyone know of any relevant apps?
[quote]Anyone know of any relevant apps?
[/quote]
http://www.fraps.com/downloads.htm Fraps would work,
and if you don’t need sound then you can use the free version. Otherwise you’ll have to pay for it.
I used the free mpeg_encode from Berkeley, which converts a series of image files into a mpeg movie file. The encoder supposedly accepts a variety of image formats and is generally pretty powerful. I was eventually able to create mpeg files from my Java application from a series of png files (wasn’t able to get it to accept jpegs for some reason).
However, this is not a super fast method of capturing video, especially in realtime. I have to keep the resolution small and the frame rates of my application noticeably slow down.
Next I am going to look at the Java Media Framework, which you may want to consider, to see if I can get better performance as well as access to some different recording formats.
Sean
[quote]I used the free mpeg_encode from Berkeley, which converts a series of image files into a mpeg movie file. The encoder supposedly accepts a variety of image formats and is generally pretty powerful. I was eventually able to create mpeg files from my Java application from a series of png files (wasn’t able to get it to accept jpegs for some reason).
[/quote]
Do you have found a solution for integrating sound to the movie?
OK, I will take a look at JMF.
No, I wasn’t using sound in my application, so didn’t try to capture any. One thing at a time
Sean
Have you thought about using the Quicktime for Java API. It has some great demos that actually work. I think all you would have to do is render to a pbuffer, get the image, and use that as a frame in the .mov.