Is there a way to render 2d graphics to flash. And if not directly to flash, is there a way to render 2d graphics to a some video format in Java?
Ideally, I don't want to do motion capture the swing application, I want to use the Java libraries to render the video.
The graphics might include something simple, a colored rectangle moving across the screen.
What are the key technologies for doing this?
In answer to a similar earlier question Xuggler was mentioned as a way of encoding video from a sequence of images. I haven't seen anything in Java to actually capture graphics as a video stream.
I've just found the QuickTimeWriter class used in Werner Randelshofer's CubeTwister application. The example code in the Javadoc doesn't quite work out of the box, but I did manage to hack together some code to generate a movie from one of my existing Swing demo applications by "printing" my JComponent to a BufferedImage at regular intervals. There may be a better way but it works as a proof of principle.
You should check the conditions if reusing the code, but if I understand correctly he is making the it available under a Creative Commons Attribution licence.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With