Skip to main content
March 31, 2011
Question

Recording webcam with FMS fails

  • March 31, 2011
  • 1 reply
  • 676 views

Hello,

I managed to record webcam stream by using the FMS developper version locally my computer.

And if I try to use a remote FMS (FMS Stream EDTN 3.5 ALP), my doesn't work anymore!

Is it a licence restriction or fault within my code? Thks for your help

    import mx.rpc.http.HTTPService;
            import flash.net.ObjectEncoding;
           
            private var nc:NetConnection;
            private var camera:Camera;
            private var microphone:Microphone;
            private var nsPublish:NetStream;                     
            private var nsPlay:NetStream;                     
            private var videoLocal:Video;
           
            //NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;
            private function initApp():void
            {
                nc = new NetConnection();
                nc.objectEncoding = flash.net.ObjectEncoding.AMF0;
                nc.connect("
rtmp://x.x.x.x/xxxx/test/RecordStream/visio");
            }           
            private function startCamera():void
            {
                camera = Camera.getCamera();
                microphone = Microphone.getMicrophone();
                vcLocal.attachCamera(camera);
                nsPublish = new NetStream(nc);
                nsPublish.attachCamera(camera);
                nsPublish.attachAudio(microphone);
                nsPublish.publish("visio", "record");
            }
           
            private function stopCamera():void
            {
                nsPublish.close();
            }
           
           
           
            private function play():void
            {
                videoFMS.source = "rtmp://x.x.x.x/xxxx/test/RecordStream/visio";
                videoFMS.live = true;
                videoFMS.play();
            }

    This topic has been closed for replies.

    1 reply

    March 31, 2011

    Streaming server does not support recording... you'll need interactive server for that. See the comparison matrix here:

    http://www.adobe.com/products/flashmediaserver/helpmechoose.html