检测到RTP SSRC冲突:终止流
RTP SSRC collision detected: terminating stream
ID: communication/rtp-ssrc-collision-detected
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| FFmpeg 6.1 | active | — | — | — |
| GStreamer 1.22.0 | active | — | — | — |
| WebRTC (libwebrtc M120) | active | — | — | — |
| Janus 1.2.0 | active | — | — | — |
| MediaSoup 3.10.0 | active | — | — | — |
根因分析
同一RTP会话中的两个或多个参与者使用了相同的同步源(SSRC)标识符,导致RTP堆栈终止其中一个流以解决冲突,如RFC 3550第8.1节所述。
English
Two or more RTP participants in the same session are using the same Synchronization Source (SSRC) identifier, causing the RTP stack to terminate one stream to resolve the collision as per RFC 3550 section 8.1.
官方文档
https://www.rfc-editor.org/rfc/rfc3550#section-8.1解决方案
-
Ensure each RTP participant generates a random SSRC using a cryptographically secure random number generator: in C with GStreamer, set 'gst_rtp_buffer_set_ssrc(buffer, g_random_int())'.
-
Use RTCP to detect and resolve collisions automatically: enable RTCP support in both sender and receiver, and implement the collision resolution logic from RFC 3550 section 8.2 (send BYE and re-randomize SSRC).
无效尝试
常见但无效的做法:
-
Manually assign a fixed SSRC value in the RTP sender configuration
95% 失败
Static SSRC assignment guarantees collisions if multiple senders use the same value; RFC requires SSRC to be randomly chosen to minimize collision probability.
-
Disable SSRC collision detection in the RTP stack
90% 失败
Disabling collision detection violates RFC 3550 and can cause undetected stream corruption, packet loss, and audio/video desynchronization.
-
Increase the RTP buffer size to absorb the collision
85% 失败
Buffer size does not affect SSRC collisions; it only affects jitter handling and packet reordering.