开发者

Creating videos with Java2D

I'm in the process of writing a Java and FFmpeg based video editor, and I'm trying to find a library that would allow me to create a video from frames rendered via Java2D.

By 'video' I mean in a standard format (preferably vp8/webm, but anything common should be alright). It would be a plus if there was some facility for modifying preexisting videos as well, but that may need to be left to ffmpeg. Audio isn't needed as I'll mainly be working with ffmpeg for that.

The obvious solution would be to save each frame as an image and have ffmpeg combine them - but I worry about performance and quality using this method. Additionally, some tests showed that even short videos (less than 5 minutes) at 1280x720 resolution would be pretty massive in size - which I'd like to avoid if possible. Working a little more directly with compressed formats rather than huge batches开发者_JAVA技巧 of image files would certainly be preferred, or at least some method that isn't too hungry for disk space.

I'm not against homebrew solutions either (I'm already writing the ffmpeg bindings from scratch), but I don't know how practical it would be to write my own vp8 encoder for something that seems like it should be fairly simple.

Any suggestions on where to go with this? Or is the best solution to generate a individual image files and combine them later?

Thanks!


Have you had a look at Xuggler? It should be able to encode videos in the way you describe, though I haven't tried producing videos from a series of BufferedImages it should be possible.

It sits on top of ffmpeg and is pretty powerful with what it can achieve - it's not the easiest API to start with but there are a number of good tutorials around.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜