本文介绍了从浏览器中使用Flash,PHP,Red5的视频录制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望利用我可以录制视频(以及音频)以及音频(只有音频preferably MP3格式)来构建应用程序。

I wish to build an application using which I can record video (along with audio) and also audio (only audio preferably in mp3 format).

从一些研究,我做了,我发现我需要在Flash或Flex客户端应用程序,一个RTMP服务器(RED5 preferable为免费)

From some research I did, I found I need a client app in flash or flex, a RTMP Server (RED5 preferable as its free)

这是我用来获取凸轮工作闪光灯code。

This is the code which I used to get cam working flash.

var camera:Camera = Camera.getCamera();
var video:Video = new Video(); 
video.attachCamera(camera);
addChild(video);

现在的问题是,我不知道如何将流发送到RED5。

The problem is, I don't know how to send the stream to RED5.

此外,什么做我需要做的,这样我可以根据用户存储视频。我创建这个网站是在PHP / MySQL的,需要有自己的视频和音频记录。我爱的方式的Facebook集成视频录制。

Also, what do I need to do so that I can store the video according to the user. The website I am creating is in PHP/MySQL and need to have their own videos and audios recorded. I love the way facebook has integrated Video Recording.

推荐答案

下面是准确的AS3 $ C $下从Flash发布视频,喜欢的Red5,Wowza或AMS媒体服务器:

Here's the exact AS3 code for publishing video from Flash to a media server like Red5, Wowza or AMS:

//init vars
public var nc:NetConnection;
public var ns:NetStream;

//net connection to media server
nc = new NetConnection();
nc.connect("rtmp://yourmediaserver/oflaDemo/instance");

//net stream through which the recording  data is sent
ns =  new NetStream(nc)

//attach cam and mic to net stream
ns.attachCamera(Camera.getCamera())
ns.attachAudio(Microphone.getMicrophone())

//send the data to the media server
ns.publish("streamName","record");

对于刚刚音频注释的 ns.attachAudio 行。

Flash Player无法连接code MP3的音质(也可以去code)。你会得到完善的EN $ C $光盘NELLYMOSER麻生。 Speex语音也是一种选择。 详情请见这个答案

Flash Player can't encode mp3 sound (it can decode). You'll get sound encoded with NellyMoser ASAO. Speex is also an option. See this answer for more details.

oflaDemo 是一个Red5的应用程序,支持多数民众赞成附带的Red5视频录制。

oflaDemo is a Red5 app that supports video recording that's shipped with Red5.

对于一个(商业)的Flash / HTML视频录制解决方案,支持的Red5和PHP你应该看看 https://hdfvr.com

For a (commercial) Flash/HTML video recording solution that supports Red5 and PHP you should check out https://hdfvr.com.

此外,什么做我需要做的,这样我可以根据用户存储视频。

只需执行一个PHP脚本(从Flash客户端),其在数据库中保存的信息。可以使用POST或GET发送视频数据和会话或Cookie获取用户数据。

Just execute a PHP script (from the Flash client) that saves the info in the database. You can use POST or GET to send the video data and sessions or cookies to retrieve the user data.

这篇关于从浏览器中使用Flash,PHP,Red5的视频录制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 18:31