Re: JMF: Compose video from individual Images?
Simon wrote:
Hi all,
is there a way to use the Java Media Framework to create a video from a
set of, say, BufferedImages (or anything on which I can create a
Graphics context)?
My application is this: I want to make an animation which I can paint on
a GUI component and export to an mpg or avi file. However, it takes
rather long to render the individual frames, so I cannot generate them
at realtime.
So far, what I can do is export a bunch of files to a temporary
directory and use command line tools to make this into a video, but this
is not very convenient because it consumes much disk space and is not
pure Java.
What I have found out so far: I can convert java.awt.Images to
javax.media.Buffers by using javax.media.util.ImageToBuffer. This Buffer
has a javax.media.format.RGBFormat for which there exist the following
Codecs:
com.sun.media.codec.video.jpeg.NativeEncoder
com.sun.media.codec.video.colorspace.JavaRGBConverter
com.sun.media.codec.video.colorspace.JavaRGBToYUV
I have also found the javax.media.protocol.PullBufferStream which I
could extend to return my thus generated Buffers in the read(Buffer)
method, but it looks like this does not help me much with my goal of
turning images into a video, right?
Are there any code examples/tutorials on the Web that do a similar thing?
Thanks for your help,
Simon
JMF is history. Sun isn't supporting it and Java 7 is supposed to be
starting a new media API.
That said, I don't know why you can't just do what you explained above.
A BufferedImage is an Image so that should work just fine.
I haven't worked with JMF in a long time and can't really help you with
details. There may be somebody else on this list that is more current.
There is another mailing list for JMF but I stopped reading it a
couple of months ago because there was never any traffic. I don't think
JMF is being used much any more.
--
Knute Johnson
email s/nospam/knute2008/
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access