简体   繁体   中英

record video using flash media server 4.5

Hello i am trying to capture my camera as an flv file with fms 4.5 i am doing the following:

        protected function rec_clickHandler(event:MouseEvent):void
        {
            nc = new NetConnection();
            nc.client = { onBWDone: function():void{ trace("onBWDone") } };
            nc.connect("rtmp://localhost/vod");
            nc.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);

        }

        private function netStatusHandler(e:NetStatusEvent):void  {    
            var code:String = e.info.code;              

            if(code == "NetConnection.Connect.Success"){                //in case of recording...


                ns = new NetStream(nc); 
                ns.attachCamera(cam);
                ns.attachAudio(mic);
                ns.publish("filename","record");

            }    
            else{    
                trace(code);   
            }  
        }

but i get the following error:

Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Record.NoAccess

Can anyone help? what am i doing wrong?

This status message, NetStream.Record.NoAccess , generally indicates that you don't have write permissions to the stream. Check the permissions of your streams dir to see if it is read only.

If that is not the issue, check which application are you trying to publish to, does not SSAS that has code to deny write access to stream

Make sure the previously recorded video is not being opened in any video player. If it is being accessed by some other program, it will not allow you to record or rewrite it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM