Red5-录音机不工作
我已经完成了 red5 服务器安装。服务器安装中一切正常。所有演示 red5 应用程序都运行良好。但我遇到了 red5-recorder 问题..我收到错误:无法连接到服务器 rtmp://127.0.0.1 ..我还需要在代码中进行其他修改吗?
I have done with red5 server installation.everything works fine in server installation..all the demo red5 applications are working perfectly. but I'm getting problem with red5-recorder..I'm getting an ERROR:could not connect to the server rtmp://127.0.0.1 ..Is there any other modification I have to do in the code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
错误:无法连接到服务器 rtmp://127.0.0.1 是由
if(Application.application.parameters.server!=null) myRecorder.server= Application.application.parameters.server;
引起的默认为 nc.connect(myRecorder.server) 返回 127.0.0.1/red5recorder
为了解决这个问题,您可以传递 server= FlashVar。
编辑 red5recorder.html 并将其添加到适当的位置(第 #91 行之后):
"FlashVars", "server=rtmp://your.external.server.ip/red5recorder"
这是因为 swf 已下载并在客户端运行,并且需要连接到您服务器的RTMP服务。它无法连接到 127.0.0.1/red5recorder,因为那是您的电脑。这就是您设置 server= 参数的原因。 :-)
我希望有帮助。
ERROR:could not connect to the server rtmp://127.0.0.1 is caused by
if(Application.application.parameters.server!=null) myRecorder.server= Application.application.parameters.server;
which defaults to nc.connect(myRecorder.server) which returns 127.0.0.1/red5recorder
In order to get around this, you can pass along the server= FlashVar.
Edit red5recorder.html and add this in the appropriate place (after line #91):
"FlashVars", "server=rtmp://your.external.server.ip/red5recorder"
This is because the swf is downloaded and run client side, and needs to connect to your server's RTMP service. It can't connect to 127.0.0.1/red5recorder because that's your PC. This is why you set the server= paramerter. :-)
I hope that helps.
我为 Red5Recorder 创建了一个新的 Web 应用程序,如此处所示,名称为“red5recorder”,因为这是录音机用来通信的名称。 (请参阅源代码中的 Recorder.as 文件),重新启动服务器后它开始工作。名为“video.flv”的输出文件位于streams/子目录中。
我希望这对你有帮助。
克里斯蒂安
I created a new web app for Red5Recorder as indicates here with the name "red5recorder" because that's the name the recorder use to comunicate with. (see the Recorder.as file in the sources) and after restarted the server it started to work. The output file called "video.flv" is in the streams/ subdirectory.
I hope this helps you.
Cristian