简体   繁体   English

Java:从框架制作动画/视频

[英]Java: Make an animation/video from frames

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. 对于一个研究项目(使用Java),我必须找到某种方法来将图形的动画保存为某种文件格式。 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. 问题是,由于缺乏学习整个GIF或AVI文件格式的知识,我不知道如何以编程方式将帧组合成某种动画或视频文件。 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. 现在,我正在考虑最简单的格式是GIF动画或AVI。 Again, though, it really doesn't matter so long as it works. 再次强调一下,只要有效就没有关系。

Thanks a bunch! 谢谢一群!

They might not be the best options, but I just thought of these: 它们可能不是最佳选择,但我只是想到了这些:

  • You might be able to use some QuickTime APIs. 您也许可以使用某些QuickTime API。 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 . 您还可以生成每个框架,然后将其与ffmpeg组装在一起。

试试Xuggler-它可以让您将图形保存为几乎任何视频格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM