Problem description

Stuttering occurs during the playback of a live stream.

Troubleshooting

Stuttering may occur during the playback of a live stream due to many causes. To troubleshoot the issue, consider the following aspects and take measures based on actual circumstances:

  • Stream ingest client
    • The data transmission rate cannot meet the frame rate requirements of smooth playback due to insufficient upstream bandwidth or network jitters.

      Solution: We recommend that you use Speedtest, a network speed test tool, to measure the speed of your upstream Internet connection.

    • The hardware may not meet the requirements for the specified bitrate, frame rate, or encoding level. This may cause encoding latency and impede smooth playback.

      Solution: You can lower the requirements for the specified bitrate, frame rate, and encoding level to check whether playback stuttering is reduced. If playback stuttering is reduced, you can consider upgrading your hardware.

    • A specific amount of CPU resources is consumed during stream ingest. For mobile phones with dated hardware, if the overall CPU utilization exceeds 80% during stream ingest, screen flickers and stuttering may occur at different levels. Meanwhile, the video capture and user experience are affected.
    • The video capture rate is too low.

      Solution: For human eyes, a video with a frame rate of 15 frames per second (FPS) or higher looks smooth. If the frame rate of a video is less than 10 FPS, stuttering may frequently occur during the playback. You can set the video frame rate to 15 FPS or higher unless otherwise specified.

      The higher the frame rate of a video, the more fluent the motion is perceived. However, when the frame rate exceeds 30 FPS, human eyes cannot recognize the effect. Meanwhile, increasing the frame rate of a video increases the transmission bandwidth. Therefore, we recommend that you set an appropriate frame rate.

  • Server

    To ensure instant loading and reduce stuttering, the server may cache data of 4 seconds before playback by default. Caching on the server may cause pre-playback latency. The cache duration varies with the group of pictures (GOP) size. You can set the cache duration to reduce playback stuttering.

    You can set a high live streaming latency and save the configuration. For more information, see Configure the live streaming latency.

    • The actual latency is related to two factors: latency settings and GOP size of stream pushing. For example, if you set the Real-Time Messaging Protocol (RTMP) latency to a middle range and set the GOP size to 2 seconds, the actual latency is 2 seconds to 6 seconds.
    • Setting a high latency causes the live stream and playback clients to be out of synchronization. Therefore, we recommend that you select an appropriate latency level based on your business needs.
  • Playback client

    Most players decode the cached data for playback when the cache is full. The cache size affects playback stuttering. You can increase the cache size to reduce playback stuttering.

  • Network bandwidth

    In most scenarios, stuttering occurs during the playback due to network conditions. The following common causes may lead to stuttering:

    • Lower network bandwidth: Contact your Internet service provider to confirm your network bandwidth size and check whether the bandwidth is sufficient for the live stream.
    • Consumed downstream bandwidth: Check whether the network bandwidth is consumed by downloading activities.
    • Consumed system resources: Check whether a large number of programs are running in the background. You can delete or stop the programs that are running and no longer needed to release the resources.