Issue Description:
Users experienced lagging and jittery video playback during live streaming within their Agora-based application when using OBS (Open Broadcaster Software) to push the live feed. The issue resulted in an inconsistent viewing experience for end-users.
Platform/SDK:
OBS connected to Agora Real-Time Communication (RTC) platform for live streaming.
Error Message:
No explicit error message was displayed. The issue manifested as visible video lag and jitter on the viewer side.
Step by Step Solution:
1. Check OBS Output Settings
- Open OBS and navigate to Settings > Output.
- Verify that the video bitrate is configured appropriately for your upload bandwidth and resolution. For example:
- 720p at 30fps → 2500–4000 Kbps
- 1080p at 60fps → 4500–6000 Kbps
2. Adjust Resolution and Frame Rate
- Go to Settings > Video in OBS.
- Lower the Base (Canvas) Resolution and Output (Scaled) Resolution to a level supported by your network and viewers' devices.
- Ensure the frame rate (FPS) is consistent with the chosen bitrate (e.g., 30fps for most standard streams).
3. Confirm Network Conditions
- Close any unnecessary background applications consuming bandwidth.
- Perform a speed test to ensure sufficient upload speed (recommended at least 1.5x the selected bitrate).
- Use a wired network connection instead of Wi-Fi for stable transmission.
4. Re-verify Agora Channel Configuration
- Make sure only one active Agora channel and UID is used per live stream.
- Avoid having multiple streams with the same channel name and UID, as it can cause interruptions.
5. Restart and Test the Stream
- Restart OBS and Agora streaming service.
- Conduct a brief test before going live to verify that video is smooth and lag-free.
Root Cause:
The lag occurred because the OBS stream was configured with a resolution higher than the bitrate could support, leading to frame drops and visible jitter during playback. Once the bitrate and resolution were aligned, playback stabilized.
Prevention/Best Practice:
- Always match the OBS bitrate to the chosen output resolution and frame rate.
- Test stream quality in a controlled environment before live sessions.
- Keep OBS and Agora SDKs updated to the latest stable versions.
Corresponding Document/Link:
- Agora Live Streaming Best Practices
- OBS Studio Settings for Optimal Streaming
- Agora Support Plans