简体   繁体   English

使用Flash媒体服务器4.5录制视频

[英]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: 您好我正在尝试将我的相机捕获为fms 4.5的flv文件我正在执行以下操作:

        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. 此状态消息NetStream.Record.NoAccess通常表示您没有对该流的写入权限。 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 如果这不是问题,请检查您要发布到哪个应用程序,SSAS是否具有拒绝对流的写访问权限的代码

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. 如果某些其他程序正在访问它,则不允许您记录或重写它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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