Red5通讯延迟 [英] Red5 communication delay

查看:71
本文介绍了Red5通讯延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Red5流记录器应用程序,用于记录客户的摄像头和麦克风。它通过 NetStream.publish( streamname, live)记录流,并调用一个远程记录并开始对其进行记录。问题是客户端调用远程 startRecording 方法并且服务器开始记录流之后,整个通信速度变慢并且有很长的延迟,通常是半分钟!由于经济增长放缓,即使是远程通话,一切都将有很长的延迟。在本地主机中,它工作良好。是什么问题?

I have created a Red5 stream recorder app that records the client's camera and mic. It records the stream by NetStream.publish("streamname","live") and invokes a remote call that starts recording it. The problem is after the client calls the remote startRecording method and the server starts recording the stream, the whole communication slows down and has a long delay, often a half minute! From the slowdown everything has long delays even the remote calls. In the localhost it works good. What is the problem?

推荐答案

您可能需要启动一个新线程来处理服务器端记录。
我们遇到了类似的问题,并通过向在其自己的线程中运行的流中添加StreamListener并使用类似于以下内容的结构来解决此问题:
http://en.wikipedia.org/wiki/Semaphore_%28programming%29
收集所有数据包并将其写入磁盘,独立

You might need to start a new Thread for the processing of the server side recording. We had similar issues and solved it by adding a StreamListener to the stream that runs in its own Thread and uses a construct similar to: http://en.wikipedia.org/wiki/Semaphore_%28programming%29 to collect all packets and write them to disc, independent of the red5 application logic.

那样,我们已经能够解决服务器端记录中的性能问题。

That way we have been able to solve the performance issues in server side recording.

塞巴斯蒂安

这篇关于Red5通讯延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆