sstauross
sstauross

Reputation: 2680

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?

Upvotes: 0

Views: 2025

Answers (2)

Gurpreet Hanjra
Gurpreet Hanjra

Reputation: 11

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.

Upvotes: 1

Stu Thompson
Stu Thompson

Reputation: 38878

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

Upvotes: 1

Related Questions