How would I convert an an array of BufferedImages into a video? I'm making a screen recorder.
This is my main question, but if you know, how would I compress the video afterward?
Thanks.
How would I convert an an array of BufferedImages into a video? I'm making a screen recorder.
This is my main question, but if you know, how would I compress the video afterward?
Thanks.
You'll need the JMF (Java Media Framework) API for this. Sun has a code sample on the subject in the JMF documentation: Generating a Movie File from a List of (JPEG) Images.
Werner Randelshofer did some work to create a Quicktime movie. See: http://blog.hslu.ch/rawcoder/2008/08/12/writing-avi-videos-using-pure-java/
You could also use Xuggler: http://www.xuggle.com
You can use Xuggler (on Windows, Mac or Linux) to do this, and the following tutorials will show you exactly how to do it. In particular, see the (I'm not kidding) "How to Grow Some Balls" tutorial for a program that makes a video out of a series of BufferedImages (and some audio).