Which Java library to use for record a video from a connected camera?

筅森魡賤 提交于 2019-12-05 15:56:02

I'd recommend VLCj for this - it should be able to stream from webcams onto a Java canvas without any difficulties. It uses native code so you need to provide libvlc.so / dll but from there on it should work on all the major platforms (Windows, Mac, Linux).

You may need to look at out of process players for complete reliability which is a bit more complex (see here for my efforts so far) but once you've got that in place it should work fine.

Jonathan

There really is no good camera support for Java. You will have to use native code, tailored for each platform, through JNI to get video capture for your project.

There's a related question here. Basically they're suggesting OpenCV wrapped with JNI.

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