2011-07-03 35 views
1

我建立一个现场直播的网站,我使用 1- FMS 2- Apache网络服务器我必须让FMS从我的相机发布流吗?

我已经做了subcriber和我工作得很好。 但我需要建立发布者以允许用户从他们的相机播放他们的流。

我测试了一个使用actionscript构建的发布者,它没有工作,直到我在本地主机上安装了fms,但我需要一个发布者,任何用户都可以在他的Web浏览器中使用它。

我的出版商:

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发布从我的相机流到我的网站?

回答

0

如果你想流直播视频,你需要一个流媒体服务器。不一定是FMS,您也可以使用Red5,Wowza,甚至可以使用RTMPD或RTMPLite等开源解决方案。

相关问题