How to optimize the time delay live video Caton

Imagine, when you and your friends for video, then suddenly stuck the picture does not move, and the sound becomes intermittent, it is not particularly feel embarrassed? To avoid these situations, then live app development process for the delay, it can be optimized to what is technically? The following Billiton magic technology will be a brief introduction.

First, coding optimization
First, make sure Codec opened the lowest latency settings. Codec generally have low latency switch optimized for H.264 which is particularly effective. Further, the encoder codes usually controlled delay caused by it as a buffer between the encoder and the decoder bit stream, without affecting the quality of the video, it is set as small as possible delay can be reduced. Also, it is best not to use the video MJPEG video compression formats, at least without the use of B frames MPEG4 video compression format, preferably using H.264baseline profile of such a simple optimization. Such a simple optimization can reduce the delay because it enables full frame rate of video encoding at a lower bit rate.

Second, the transmission protocol optimized
to make use instead HLS RTMP protocol for transmission between the service node and end node, which can reduce the overall transmission delay. If the end user to play using RTMP, transcoding possible near the end of the closing plug flow streaming node, transmission of such a video stream is smaller than the original video stream. In addition, if necessary, replace the TCP protocol can be customized using the UDP protocol, eliminating the net loss under weak link retransmission can reduce delay.
Third, the transmission network optimization
cache server node in the current GOP, with the video player first open end of the optimization time. You can also let the server in real-time record of each video stream flow-second frame rate and bit rate at each link for real-time monitoring rate fluctuations and frame rate, then you can adjust for this situation.
Fourth, the plug flow optimize play
playout buffer control for opening the first delayed video is also affected, if only the first of delay optimization, can be decoded at the time of data arrival at 0 buffer condition immediately. But if in order to eliminate the effect caused by the network jitter, set a certain cache is also necessary in a weak network environment, it is necessary to open delay in the broadcast of the first to find a balance and stability on optimization, adjust and optimize the buffer size value. In addition to dynamically adjust policies outside the buffer size, you can also use real-time monitoring of network information to dynamically adjust the playback bit rate, reduced rate for playback in case of insufficient network bandwidth and reduce latency.
These are the live app development, respect for the delay, at the technical level can do optimization.

Guess you like

Origin blog.51cto.com/14528075/2459497
Recommended