从渲染到JavaFX 2.0 MediaView一个摄像机的视频流 [英] Video Stream from a Camera rendered into JavaFX 2.0 MediaView

查看:2820
本文介绍了从渲染到JavaFX 2.0 MediaView一个摄像机的视频流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于JavaFX2.0有一个媒体的看法是它在某种程度上可以活流摄像机送入实时媒体组件?由于没有摄像头API,我不知道如何做到这一点。我们可以利用其他Java库与摄像头的工作,然后在MediaView流视频

Since JavaFX2.0 has a media view is it somehow possible to live stream the camera feed into the Media component in real time? Since there is no camera API I am unaware of how to make this happen. Can we use another Java library to work with the camera and then stream the video in the MediaView

因此​​,它是可能的,如果是的话,我们怎么能做到这一点。可通过使用任何的JavaAPI的相机,然后流媒体视频到MediaView?

So is it possible, and if yes then how can we do it. May be by using any JavaAPI for camera and then streaming the video into the MediaView?

推荐答案

看来,在2.0您仍然无法连接的视频/音频流的外部来源。您需要创建一个文件,并提供一个URI,该文件中的MediaView播放视频。不能接受从相机捕获视频。
我没有做这个用JavaFX 2.0,但在1.3,我们用来提供只是一个形象的ImageView的编写我们自己的捕捉/流光。也许你可以与任何第三方的lib做到这一点。

It seems that in 2.0 you still cannot attach an external source for the video/audio streams. You need to create a file and provide an uri to this file to play video in the MediaView. Not acceptable for the capture video from the camera. I did not do this in JavaFX 2.0 but in 1.3 we used to deliver just an image to the ImageView writing our own capturer/streamer. Possibly you can do this with any 3rd party lib.

这篇关于从渲染到JavaFX 2.0 MediaView一个摄像机的视频流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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