ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.37k stars 5.34k forks source link

WebRTC: Occasionally issue the SSRC is not found. #4060

Open 437927973 opened 4 months ago

437927973 commented 4 months ago

Describe the bug A main screen and four side screens are developed using Electron. The main screen has a screen sharing toggle. When activated, it opens a WebSocket connection to send screen sharing messages to the four side screens. Upon receiving the messages, the side screens start to request and pull the screen content. After repeating this process a few times, there are instances where some screens fail to pull the content. Additionally, there is an issue where the four side screens, when pulling the content simultaneously, do so at different speeds. The log can be viewed at the provided GitHub link.

Device information:

  1. The highest configuration, which can pull the stream quickly, has an 8-core 16-thread i7 CPU, 16GB of RAM, and runs Windows 10.
  2. The second fastest in terms of pulling the stream has a 4-core 8-thread i5 CPU, 8GB of RAM, and runs Windows 10.
  3. and 4. have the same configuration as the second one, with an i5 4-core 8-thread CPU and 8GB of RAM, and they experience the issue of failing to pull the stream as mentioned above.

Version 4.0.268 I have tried the latest 5.0 version and also the latest 6.0 version. The issue occurs with both, and it seems to happen more frequently with the newer version. To Reproduce Repeatedly pushing the stream from the main screen while simultaneously pulling the stream on four side screens results in one screen being unable to pull the stream.

Expected behavior I hope this issue can be resolved quickly, and I also hope that differences in hardware configurations do not lead to inconsistent speeds in image retrieval. I wish for the images to be displayed synchronously.

Screenshots rtc

Additional context none

TRANS_BY_GPT4

winlinvip commented 3 months ago

The general approach to solving sporadic issues is to identify a path where the issue consistently occurs, or a path where the issue can be reproduced with high probability.

TRANS_BY_GPT4

437927973 commented 3 months ago

A main screen initiates a stream and sends WebSocket messages to four side screens. Upon receiving the WebSocket messages from the main screen, the four side screens immediately display a window. Inside this window, dynamic creation of video tags begins, followed by the start of stream playback.

TRANS_BY_GPT4