Help Center/ Live/ Troubleshooting/ Live Video Freezing
Updated on 2024-08-05 GMT+08:00

Live Video Freezing

Symptom

Live video freezes while being played. The entire livestreaming process involves the streaming end, playback end, and origin server in Live (CDN), as shown in Figure 1. All of them may lead to video freezing. Perform the following operations to locate the cause and rectify the fault:

Figure 1 Livestreaming process

Checking the Streaming End

The possible cause is that freezing occurs during stream push due to factors such as the streaming device configurations, video parameter settings, and network environment. If freezing occurs on the streaming end, locate the cause from the following aspects:
  • Device configurations

    Stream push will occupy a certain proportion of CPU resources. If a low-end device with poor hardware configurations is used and its overall CPU usage exceeds 80%, freezing and artifacts will occur, compromising video quality. You can change device configurations or use a higher version of streaming device to ensure device stability.

  • Streaming SDK configurations

    If the bitrate, frame rate, and encoding level set on the encoder are too high, the encoding speed will be lowered due to hardware constraints. If you use an iOS streaming device, hard coding is recommended because iOS is highly compatible with hardware devices and is more power-saving. If you use an Android streaming device, hard coding is recommended for Android 4.3 or later, as there are too many models and CPU types.

  • Video parameter settings

    To ensure smooth video playback, the frame rate is set to be greater than 15 frames per second (FPS). If the frame rate is lower than 10 FPS, noticeable freezing occurs. Therefore, a frame rate of 15–30 FPS is recommended. If the frame rate exceeds 30 FPS, human eyes cannot tell the difference and the bandwidth cost for video transmission will rise. A higher frame rate does not necessarily mean better video quality.

  • Network bandwidth

    Perform an online bandwidth test on the network of the streaming device. The recommended upstream bandwidth is higher than 10 Mbit/s.

  • System resource usage

    Check whether a large number of programs are running on the server. It yes, delete or stop these programs to release resources.

Checking the Playback End

  • Most players have a receive buffer. A player decodes and plays the video after the buffer is full. The size of the receive buffer is also a factor of freezing during playback. You are advised to adjust the size of the receive buffer to avoid video freezing.
  • If the player uses hard encoding in a poor network environment, drop frames and reduce audio bitrate to avoid video freezing.
  • Perform an online bandwidth test. If the bandwidth of the player is insufficient or jitter occurs, video will freeze. Check whether there is ongoing download. Bandwidth-consuming operations such as download should be avoided during video playback.
  • If you use the third-party tool Open Broadcaster Software (OBS) to push streams, perform the following steps to configure parameters:
    1. Choose Output and set Output Mode to Advanced.
    2. Set Keyframe Interval (seconds, 0=auto) to 2.
      Figure 2 OBS streaming delay settings

Checking the Origin Server (CDN) in Live

If no problems are found on the streaming end and playback end, check whether the origin server and acceleration area are correctly configured.

If no problems are found, submit a service ticket to check whether the origin server or CDN in Live is faulty.

Attach the following information to the service ticket:

  • Time when the problem occurs
  • Symptom, including the ingest URL, streaming URL, and URLs with failed or slow access
  • Information about the faulty node and the returned result diagram of pinging the domain name
  • User egress IP address and egress DNS, for example, http://dns-detect-portal.n.cdnhwc5.cn/?domain=xx.xx.xx, and the access screenshots