How can I capture video from a webcam in java with an applet?

♀尐吖头ヾ 提交于 2020-01-03 05:42:28

问题


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?


回答1:


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

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.

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.

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



来源:https://stackoverflow.com/questions/5697976/how-can-i-capture-video-from-a-webcam-in-java-with-an-applet

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