Red5 communication delay

荒凉一梦 提交于 2019-12-13 17:15:25

问题


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?


回答1:


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.

Sebastian



来源:https://stackoverflow.com/questions/12893159/red5-communication-delay

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!