logo
On this page

How to handle the issue of video stuttering or audio-video out of sync when using OBS to publish and SDK to play?

2022-11-15
Products / Plugins:Video Call / Live streaming
Platform / Framework:iOS / Android / Windows

Problem Description

When using OBS to publish and SDK to play, video stuttering or audio-video out of sync occurs.

Problem Cause

When using OBS to publish, the stream with B frames is published. Streams with B frames have large latency in live streaming scenarios. By default, ZEGO Express SDK does not support decoding streams with B frames, so video stuttering or audio-video out of sync occurs.

Solution

The following are 3 solutions recommended by ZEGO.

  1. Set OBS not to publish B frames

Set OBS not to publish B frames: Select "Advanced > Profile" in the output mode, and select baseline or use software decoding to play the stream with SDK.

If OBS is a classic version, set B frames in Advanced: "Advanced > Profile", select "baseline".

Note

If you have set OBS not to publish B frames and the video appears blurry for a while and then clear for a while, please refer to Solution 3 for handling.

  1. Set SDK to support playing B frames

Call the interface enableCheckPoc(false), requireHardwareDecoder(false) before playing with Express, then you can play video streams with B frames.

  1. If the video appears blurry for a while and then clear for a while, it may be because the complex video cannot be encoded at the current bitrate. There are 3 solutions:
    • Increase the bitrate
    • Increase CPU usage: Select "Advanced > CPU usage preset" in the output mode, for example, change it to medium. The more CPU used, the better the video quality.
    • Set profile to main in OBS, and the playing end needs to be adjusted to support B frames.

Previous

What are some known issues with WebRTC browsers and workaround solutions?

Next

How to handle the App Nap issue on macOS system?

On this page

Back to top