must i have FMS to publish a stream from my camera?
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 ?
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.
精彩评论