哪个Java库可用于从连接的摄像机录制视频? [英] Which Java library to use for record a video from a connected camera?

查看:84
本文介绍了哪个Java库可用于从连接的摄像机录制视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可能以为tere是一个简单的解决方案,但是没有:(

You would have thought that tere is a simple solution to this but there isn't :(

我的应用程序需要从USB /火线捕获流(或任何连接)连接的摄像机(结果将是 output.flv 之类的文件。)我希望我可以检测所有连接的摄像机并选择要使用的摄像机(一个或多个)时间->一个或多个输出文件)。应用程序必须是跨平台的。

My application needs to capture a stream from a USB/firewire (or whatever is the connection) connected camera (result would be a file like output.flv). I would prefer that I can detect all connected cameras and choose which one to use (one or more at the same time --> one or more output files). Application has to be cross platform.

找到的库:


  1. Xuggle -不是很好的相机支持。非常适合处理图像和视频。

  2. JMF -一个旧的API,但如果可以使用,我会的。我不会在下载页面上看到MAC OS X链接。

  3. FMJ -看起来像是JMF的更好版本,但找不到解决方法

  4. LTI-CIVIL -FMJ使用它。看起来它仅从相机捕获图像(而不是视频)。我可以使用Xuggle从LTI-CIVIL拍摄的图像创建视频。和FMJ一样,安装也很困难。

  1. Xuggle - not very good camera support. Good for manipulating over images and video.
  2. JMF - an old API but if I can use it, I will. I don't see a MAC OS X link on downloads page.
  3. FMJ - looks like a better version of JMF but a can't find a way of installing it.
  4. LTI-CIVIL - FMJ uses it. It looks like it only captures images from camera (not video). I could use Xuggle to create a video from images taken from LTI-CIVIL. And like FMJ, it is difficult to install.

您对此有何建议?

推荐答案

为此,我建议使用VLCj-它应该能够从网络摄像头流式传输到Java画布上而没有任何困难。它使用本机代码,因此您需要提供libvlc.so / dll,但是从那里可以在所有主要平台(Windows,Mac,Linux)上运行。

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.

这篇关于哪个Java库可用于从连接的摄像机录制视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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