# A Novel Video Transmission Latency Measurement Method for Intelligent Cloud Computing
## 3 Methodology
### Method 2: Remote Online Measurement  
Although Method 1 has higher measurement accuracy, it needs to connect both the video of the sender and the video of the receiver to the same latency measurement device. Due to this limitation, remote video transmission cannot be measured. To this end, we  
Figure 3: (**a**) Timecode latency measurement scheme; (**b**) Spline Bar in the screen. “bar” indicates the timecode. The picture contains Chinese words: “School of Information Engineering, Jimei University”. designed Method 2, and the measurement scheme is shown in Figure 4. The solution includes a flashing light and a latency measurement device at the remote receiver. Time synchronization of remotely located measuring equipment uses GPS signals. The flashing light is controlled by the GPS PPS (pulse per second) to flash once per second, and the camera will send the captured pictures including the flashing light to the latency measurement device through the video transmission system. The device records the time when each frame enters the device and finds the frame when the flashlight just starts to light up. The fractional part of the time (in milliseconds) that the frame with the light on enters the device is the end-to-end latency of the video transmission. The PPS signal that controls the flash has precise clock synchronization and the signal accuracy is less than 50 ns. The PPS signal of the GPS module we use is a pulse signal with a period of one second and a pulse width of 200 ms. The PPS signal controls the power switch to drive the light to flash, so that the flashing light flashes once per second, lasting 200 ms each time. The latency measurement device adopts a 32-bit counter driven by a 25 MHz clock as the timing value. When the device is powered on, the 32-bit timing counter is reset by the rise of the PPS signal. In normal operation, the rising edge of the PPS signal is used to reset the timer counter once every 10 min to ensure the time synchronization between the flashing light and the latency measuring device. Taking a 720p@60 camera as an example, when the light is on for 200 ms, the video shot will have approximately 12 consecutive frames in which the light is on. The video enters the latency measurement device through encoding, transmission, and decoding. The measurement device compares the brightness values of the previous and previous frames for five consecutive frames. The device determines that there is a partial increase in brightness in a frame, that is, the light is on, and continuously observes whether the position continues to remain in the next 4 frames. If the position maintains the brightness, it can determine the frame when the light just began to turn on. A 32-bit counter value \(Count_{(i)}\) is recorded representing the time the frame during which the latency measurement device entered, I represents the number of measurements. \(Count_{(i)}\) can be converted into real-time \(T_{i}\) in seconds. It can be expressed by Equation (4):  
\[T_{i}=\frac{Count_{(i)}\times 40\text{ ns}}{10^{9}} \tag{4}\]  
The fractional part of timing time \(T_{i}\) is the end-to-end latency value \(D_{i}\) of video transmission, it can be expressed by Equation (5):  
\[D=\{T_{i}\}=T_{i}-[T_{i}] \tag{5}\]  
Compared with Method 1, Method 2 is simple in operation and does not need to access the original video and the reconstructed video from the measurement device at the same time. It only needs to place the flash device in the field of view of the camera and connect the decoded reconstructed video to the latency measurement device to complete the latency measurement. Method 2 realizes remote measurement, but the disadvantage of Method 2 is that it is still a lossy video measurement, because the flashing light must be in the video content, which partially destroys the original video picture. Method 2 uses the camera to shoot the flashing light to determine the same frame, the shooting may have  
Figure 4: Remote online measurement scheme. a delay within one frame, and the measurement error is large.