srs icon indicating copy to clipboard operation
srs copied to clipboard

WebRTC: When multiple candidates, WHEP playback experience lag.

Open winlinvip opened this issue 2 years ago • 2 comments

Describe the bug When two candidates are returned, one of them is unreachable, and there is a stuttering issue when playing WHEP.

Version 6.0.96

To Reproduce Steps to reproduce the behavior:

  1. Start SRS Stack with Docker and set CANDIDATE to the private IP.
  2. When playing WHEP, add ?eip=127.0.0.1 to the URL.
  3. SRS will return two candidate addresses: one private IP and one 127.0.0.1.
  4. You will notice that WHEP playback is stuttering, and this issue consistently occurs.

Expected behavior Smooth playback without any stuttering issues.

Screenshots

Two candidates, WHEP stuttering:

https://github.com/ossrs/srs/assets/2777660/efe59330-a4fe-475c-85e5-cd48234c895e

One candidate, WHEP without stuttering:

https://github.com/ossrs/srs/assets/2777660/b6cb145a-0f08-4ecc-9b42-423e09a48646

winlinvip avatar Nov 03 '23 15:11 winlinvip

WebRTC PeerConnection may switch between multiple candidates, which are used to establish UDP connections for data transport. This may cause the stuttering or pausing of video, leading to a discomfort experience.

winlinvip avatar Mar 21 '24 02:03 winlinvip