0

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?

Stu Thompson
  • 38,370
  • 19
  • 110
  • 156
sstauross
  • 2,602
  • 2
  • 30
  • 50

2 Answers2

1

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

Stu Thompson
  • 38,370
  • 19
  • 110
  • 156
  • is it correct to use vod or should i use live as the application in order to publish record? As far as i know the syntax is rtmp://the host/the app... right? – sstauross May 25 '12 at 10:03
  • live. yes, that is the syntax. there are more than one tutorials on the interwebs to do this kinda of stuff. you might want to Google around a bit. – Stu Thompson May 25 '12 at 13:40
1

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.

Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438