Java: Make an animation/video from frames

巧了我就是萌 提交于 2019-12-24 16:46:02

问题


Howdy! For a research project (in Java), I've got to find some way to save an animation of a graph into some file format. Now I've already got the program working fine drawing each frame. The problem is, short of learning the whole GIF or AVI file format, I have no idea how to assemble the frames programmatically into some sort of animation or video file. File formats don't really matter--input or output. I just need some way to put the frames together and save!

Right now I'm thinking the easiest format would be either animated GIF or AVI. Again, though, it really doesn't matter so long as it works.

Thanks a bunch!


回答1:


They might not be the best options, but I just thought of these:

  • You might be able to use some QuickTime APIs. I know they're used fairly often for webcam input, and that they can also generate video.
  • You could also generate each frame and then assemble them with ffmpeg.



回答2:


Try Xuggler -- it'll let you save graphics into pretty much any video format.



来源:https://stackoverflow.com/questions/2286474/java-make-an-animation-video-from-frames

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!