直接从网站录制相机到服务器

发布于 2024-11-04 01:34:35 字数 347 浏览 3 评论 0原文

我正在尝试提出一个解决方案,我可以使用嵌入到网站中的一些应用程序(假设闪存中的某些内容可以覆盖尽可能多的平台),用户可以使用来自网络摄像头的声音录制视频,并将其传输到我的服务器这样它们就可以被存储起来。

我不想存储捕获的视频和内容如果可以防止空间等方面的任何问题,请在用户计算机上发出声音。

我已经查看了诸如 http:// /www.red5.org/ 但这只是服务器端的事情,需要找到某种形式的 Flash 应用程序来捕获数据并将其从浏览器发送到服务器。

有谁知道可以用什么来完成这个现成的事情,或者这是我需要自己实现的事情!?

I am trying to come up with a solution where I can use some application embedded into the website (assuming something in flash to cover as many platforms as possible) where the user can record videos with sound from a webcam that are streamed across to my server so they can be stored.

I don't want to store the captured video & sound on the users computer if that is possible to prevent any issues with space etc.

I have had a look at packages like http://www.red5.org/ but that is just the server side of things and need to find some form of flash app that can capture and send the data to there server from the browser.

Has anyone got any ideas on what can be used to do this off the shelve or is this something that I will need to implement myself!?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

[旋木] 2024-11-11 01:34:35

这里的关键是rtmp。安装 red5 并使其正常工作(防火墙等)后,您可以开始在客户端工作。如果你选择flash,我建议你使用Actionscript 3。

首先是打开一个到你的服务器的NetConnection

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://YOUR_SERVER/YOUR_APP_NAME/");

其中YOUR_SERVER是你的服务器的url,YOUR_APP_NAME是你所在的Red5应用程序的名称用于您的项目。如果你下载 Red5 你可以看到一些我认为的例子,也可以找到一些教程。还有一些不错的演示可供开始,这样您就不会在一开始就迷失方向。

因此,在打开NetConnection之后,您就可以使用NetStream类。这里的技巧是附加一个相机(使用 attachCamera 方法),然后真正的技巧是方法 publish

Publish 需要两个参数:名称和类型。名称将是您服务器上的文件名,类型可以是一些主要值,例如 recordappendlive。 Record 是录制一个新的流,或者我认为是覆盖,append 是附加上一个流,live 是直播流的类型(如会议)。

希望这可以帮助您开始,也可以尝试进行一些搜索,但这些是您可以开始的事情。如果您有问题,请随时询问。

检查参考中的这两个类:

NetConnection

NetStream

The key here is rtmp. After you installed red5 and got it working (firewalls etc), you can start to work on the client-side. If you choose flash, I advice you to use Actionscript 3.

The beginning is to open a NetConnection to your server:

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://YOUR_SERVER/YOUR_APP_NAME/");

where YOUR_SERVER is the url of your server, YOUR_APP_NAME is the name of the Red5 application you are using for your project. If you download Red5 you can see some examples I think, also you can find some tutorials. There are also some nice demos to start with, so you won't be lost in the beginning.

And so, after the NetConnection is opened, you can use the NetStream class. The trick here is to attach a camera to it (use the attachCamera method), and then the real trick is the method publish.

Publish expects two parameters, a name and a type. Name will be the filename on your server, type can be some major values, like record, append, live. Record is recording a new stream, or overwriting I think, append is to append a previous one, live is the type of live streams (like conferences).

Hope this helps you to start, also try to do some searching, but these are the things where you can start. If you have problems, feel free to ask.

Check these two classes in the reference:

NetConnection
and
NetStream.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文