我必须有 FMS 才能从我的相机发布流吗?
我正在建立一个直播网站并且我正在使用 1- 飞行管理系统 2- Apache 网络服务器
我已经制作了订阅者并且运行良好。 但我需要建立发布者以允许用户从他们的相机广播他们的流。
我已经测试了一个使用actionscript构建的发布者,直到我在本地主机上安装了fms之后它才工作,但我需要一个任何用户都可以在他的网络浏览器中使用的发布者。
我的发布商:
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
connection = new NetConnection();
connection.connect("rtmp:/live");
connection.addEventListener(NetStatusEvent.NET_STATUS,onConnected);
}
private function setupVideo():void
{
//setting up outgoing devices
camera = Camera.getCamera();
camera.setMode(640,480,30);
mic = Microphone.getMicrophone();
//setting up outgoing Stream
outStream = new NetStream(connection);
outStream.attachCamera(camera);
outStream.attachAudio(mic);
outStream.publish("EraMaX-Live");
//setting up outgoing video & attach outgoing devices
outVideo = new Video();
outVideo.attachCamera(camera);
//setting up incomming Stream
inStream = new NetStream(connection);
inStream.play("EraMaX-Live");
//setting up incomming video & attach incoming Stream
inVideo = new Video();
inVideo.attachNetStream(inStream);
//wrap video object
outVideoWrapper = new UIComponent();
outVideoWrapper.addChild(outVideo);
addElement(outVideoWrapper);
inVideoWrapper = new UIComponent();
inVideoWrapper.addChild(inVideo);
addElement(inVideoWrapper);
inVideoWrapper.move(400,0);
//setting up incomming video
}
所以我的问题是我必须有 FMS 才能将流从我的相机发布到我的网站吗?
i am building an live streaming website and i am use
1- FMS
2- Apache webserver
i have made the subcriber and i works well .
but i need to build the publisher to allow users to broadcast thier stream from thier cameras.
i have tested a publisher which was build using actionscript and it didn't work untill i have installed the fms on my localhost , but i need a publisher which any user can use in his web browser .
my publisher :
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
connection = new NetConnection();
connection.connect("rtmp:/live");
connection.addEventListener(NetStatusEvent.NET_STATUS,onConnected);
}
private function setupVideo():void
{
//setting up outgoing devices
camera = Camera.getCamera();
camera.setMode(640,480,30);
mic = Microphone.getMicrophone();
//setting up outgoing Stream
outStream = new NetStream(connection);
outStream.attachCamera(camera);
outStream.attachAudio(mic);
outStream.publish("EraMaX-Live");
//setting up outgoing video & attach outgoing devices
outVideo = new Video();
outVideo.attachCamera(camera);
//setting up incomming Stream
inStream = new NetStream(connection);
inStream.play("EraMaX-Live");
//setting up incomming video & attach incoming Stream
inVideo = new Video();
inVideo.attachNetStream(inStream);
//wrap video object
outVideoWrapper = new UIComponent();
outVideoWrapper.addChild(outVideo);
addElement(outVideoWrapper);
inVideoWrapper = new UIComponent();
inVideoWrapper.addChild(inVideo);
addElement(inVideoWrapper);
inVideoWrapper.move(400,0);
//setting up incomming video
}
so my question must i have FMS to publish a stream from my camera to my website ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想流式传输实时视频,则需要流媒体服务器。不一定是 FMS,您还可以使用 Red5、Wowza,甚至开源解决方案,例如 RTMPD 或 RTMPLite。
If you want to stream live video, you need a streaming server. Not definitely FMS, you also can use Red5, Wowza, or even open source solutions such as RTMPD or RTMPLite.