推荐的Java库,用于以编程方式创建视频 [英] Recommended Java library for creating a video programmatically
问题描述
有人可以推荐一个允许我以编程方式创建视频的Java库吗?具体来说,它将执行以下操作:
Can anyone recommend a Java library that would allow me to create a video programmatically? Specifically, it would do the following:
- 采取一系列BufferedImages作为框架
- 允许要添加的背景WAV / MP3
- 允许'偶然'WAV / MP3以任意方式,以编程方式指定的点添加
- 输出视频通用格式(MPEG等)
- take a series of BufferedImages as the frames
- allow a background WAV/MP3 to be added
- allow 'incidental' WAV/MP3s to be added at arbitrarily, programmatically specified points
- output the video in a common format (MPEG etc)
有人可以推荐什么吗?对于图像/声音混合,我甚至会使用需要一系列帧的东西,并且对于每个帧,我必须提供与该帧相关联的未压缩声音数据的原始字节。
Can anybody recommend anything? For the picture/sound mixing, I'd even live with something that took a series of frames, and for each frame I had to supply the raw bytes of uncompressed sound data associated with that frame.
PS如果Java Media Framework有调用来实现上述目标,它甚至不必是一个第三方库,但是从我粗略的记忆中我感觉它没有。
P.S. It doesn't even have to be a "third party library" as such if the Java Media Framework has the calls to achieve the above, but from my sketchy memory I have a feeling it doesn't.
推荐答案
我使用下面提到的代码在纯Java中成功执行需求列表中的第1,2和4项。值得一看,你可能会想出如何包含#3。
I've used the code mentioned below to successfully perform items 1, 2, and 4 on your requirements list in pure Java. It's worth a look and you could probably figure out how to include #3.
http://www.randelshofer.ch/blog/2010/10/writing-quicktime-movies-in-pure-java/
这篇关于推荐的Java库,用于以编程方式创建视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!