# A Novel Video Transmission Latency Measurement Method for Intelligent Cloud Computing
## 2 Analysis of Video Transmission Latency
### Network Transmission Latency and Code Rate Control  
The network transmission latency is mainly determined by the network bandwidth and buffer size. In order to reduce this part of the latency, a stable bit rate and a buffer as small as possible are required.  
In video transmission, the available transmission bandwidth is usually limited to a certain range and is really reduced by various interferences, especially in a wireless environment. Under the hybrid coding structure, the RC (rate control) mechanism chooses to adjust a series of coding parameters, usually including the partition model, prediction model and QP (quantization parameter), to control the compressed code rate within the available bandwidth. All video coding standards have their own recommended RC models. MPEG-2 adopts TM5 [36], H.263 adopts TMN8 [37], H.264/AVC adopts JVTG012 [38], and H.265/HEVC adopts JCTVC-H0213 [39] and JCTVC-K0103 [40]. The latest coding standard, H.266/VVC, adopts JVET-K0390 [41]. The research and implementation of rate control are mainly based on rate control algorithms in the Q domain [42], \(\rho\) domain [43], and \(\lambda\) domain [44]. These algorithms have high precision for average rate control. The bit number control accuracy for frame-level or finer-grained coding units is not enough to adapt to the case of small network buffers, especially when the encoded video contains fast-moving objects, significant object occlusions, and scene changes.  
The compressed video data stream needs to be sent using a network transmission protocol. In the early days, TCP or UDP was used for transmission. There is a serial number in the TCP protocol to observe the receiving status of the receiving end. The retransmission mechanism can ensure no packet loss, but it easily causes long delays and network congestion. UDP is a connectionless protocol commonly used in video broadcasting. It does not guarantee that the packets all reach the receiving end. If the  
Figure 2: Frame reference relationship of HEVC RA mode. In the figure, frame I is an internal coding frame, frame P is a forward reference frame, and frame B is a bidirectional reference frame.  
packet is lost, it will not be retransmitted, so the latency is lower. Compared with the TCP protocol, the UDP protocol will have problems such as packet loss. To solve these problems, some techniques, such as forward error correction, are sometimes adopted to ensure transmission by increasing guard bytes and sacrificing part of the bandwidth [45]. Some new transport schemes, such as WebRTC, take full advantage of the uncontrolled nature of UDP. The bottom layer of the transmission uses the UDP protocol, and the upper layer uses the SRTP (Secure Real-Time Transport Protocol) and automatic adaptation rate conversion to improve the video transmission quality. However, in WebRTC the encoding rate is changed on a second time scale. When the network is congested, some of the encoded frames are still sent out due to the response lag. The encoder is then paused until the congestion ends. The connection between the transport layer and the encoding layer of the current video transmission system is loosely coupled. For the transport layer, the information of the coding layer is lagging. The congestion control of the transport layer packets does not match the rate control of the encoding layer exactly. For this reason, it is necessary to configure corresponding buffers in each stage of transmission to alleviate the problem. However, the cache will bring queuing latency. The work in [46] evaluates the current network capacity and optimizes the compression length of each frame to achieve lower video latency and better video quality over variable network paths. The limitation of this method is that the intermediate information in the encoding process needs to be obtained in real time and it is not suitable for most encoders.