FMJ 网络摄像头捕获示例
我一直在寻找一段时间,但找不到如何使用 FMJ 捕获网络摄像头流的简单示例。 有任何教程或示例可以帮助我吗?
I've been searching for while now and I can't find a simple example of how to capture a webcam stream with FMJ. Are there any tutorials or examples available which could help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我使用 FMJ 已经有一段时间了,但我还没有找到很多可以开始的例子。 我要做的是探索 FmjStudio 类,它集成了网络摄像头功能并且非常简单。
对于鲍勃:
你想要的是 FMJ。 FMJ 使用民用数据源实现来将其与 JMF 一起使用。 我建议您去 http://fmj-sf.net/ 下载最新的源代码并探索FmjStudio 也是如此,因为它使用民用来捕获。
对于 theDude:
你是对的,你也可以使用 JMF,但是你用于 JMF 的相同代码很可能适用于 FMJ(也许有 coupla 更改),并且性能会好得多,特别是如果你想要各种不同的网络摄像头与您的软件配合使用。
I have been working with FMJ for a while and I haven't found many examples to start with either. What I would do is to explore the FmjStudio class that has the webcam functionality integrated and its pretty straight forward.
For bob:
What you want is FMJ. FMJ uses an DataSource implementation for civil to use it with JMF. I would recommend you to go to http://fmj-sf.net/ download the latest source and explore FmjStudio aswell since it uses civil to capture.
For theDude:
You are right, you can use JMF aswell but the same code you use for JMF will most likely work with FMJ (maybe with a coupla changes) and the performance will be much better, specially if you want a wide range of different webcams to work with your software.
我知道这不是您想听到的,但我已使用 JMF 来完成此任务,并且效果非常好。 网上有足够多的示例可以轻松运行简单的网络摄像头捕获应用程序。 如果您有兴趣,我会发布更多内容。
I know this isn't what you want to hear, but I've used JMF for this task and it works very well. There are enough examples online to get a simple web cam capture app running pretty easily. I'll post more if you're interested.
以下代码将帮助您入门。
请确保本机库(civil.dll 和 jdshow.dll)已加载到 JVM 中。 否则,您将收到 java.lang.UnsatisfiedLinkError。 以下代码可能会为您完成这项工作。
The following code would get you started.
Please make sure the native libraries (civil.dll and jdshow.dll) are loaded into the JVM. Otherwise, you would get an java.lang.UnsatisfiedLinkError. The following code may do the job for you.