Converting a series of images to a video in Java?

时间秒杀一切 提交于 2019-11-30 10:54:16

I'd suggest just learning how to call external programs from your java program. Then you can just run that example program you linked to. Or if you want even more capability, use ffmpeg which will do this automatically from the command line as well:

ffmpeg -i screencapture%d.jpg -vcodec mpeg4 outfile.avi

ffmpeg allows you to customize a lot of things about the output video. Just check out the documentation for all the options.

The Java command Runtime.getRuntime().exec(...) will let you run whatever command line you pass it. There are many examples of how to do this if you Google it.

I suggest to use Xuggler for this. Here's an introduction.

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