如何使用applet从Java中的摄像头捕获视频? [英] How can I capture video from a webcam in java with an applet?

查看:124
本文介绍了如何使用applet从Java中的摄像头捕获视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望使用Java小程序通过网络捕获和流式传输视频。到目前为止,JMF似乎已经过时,FMJ将无法以任何合理的速度进行捕获。还有其他库可以用来以至少每秒10-15帧的速度从网络摄像头捕获和/或流式传输视频吗?

I am loking into capturing and streaming video over the network using a java applet. So far, it looks like JMF is outdated and FMJ won't be able to capture at any reasonable speed. Is there any other library that I can use to go about capturing and or streaming video from a webcam at at least 10-15 frames per second?

推荐答案

我最近已经做过这件事,不得不编写一个JNI来捕获视频并对其进行编码或解码。

I have done this recently and had to write a JNI to capture the video and encode it or decode it.

这很痛苦,因为您必须为每个平台(例如Windows 32和64位,OSX 32和64位以及Linux 32和64位)编写JNI。

It is a pain because you have to write the JNI for each platform like Windows 32 and 64 bit, OSX 32 and 64 bit and Linux 32 and 64 bit.

使用JNLP(Java Web Start)是比applet更好的选择,因为它允许您对其进行设置,因此它将自动下载并安装当前的正确JNI。操作系统。

Using JNLP (Java web start) is a better choice than an applet as it allows you to set it up so it will automatically download and install the correct JNI for the current O/S.

JNLP或Applet都将要求您生成一个签名的jar才能工作。

Either a JNLP or Applet will require you to generate a signed jar to work.

这篇关于如何使用applet从Java中的摄像头捕获视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆