Does reusing the same ssrc or msid could cause issues / delays in rtp forwarding of a new stream?

  1. We use OBS to inject a WHIP stream into Janus videoroom and it works fine and great.

  2. We use Streaming plugin to rtp forward for scaling and works fine the first time when stream is started from OBS.

  3. But if I stop the stream from OBS and start again, people on the streaming plugin hear no sound and see no video with a random delay - from 30 seconds to 6 minutes. Videoroom is still fine.

  4. If I quit OBS, and start the stream it works fine immediately on the Streaming plugin.

  5. I inspected what OBS sends during stop/start without quiting OBS. OBS reuses the same ssrc and same msid until you quit OBS for every stream start.

  6. Could that cause the streaming plugin minutes of delay until stream appears? Could Janus be confused of the same ssrc and msid in the WHIP SDP?

Thanks in advance for any help!

Further clue: Janus logs are flooded with SRTP replay error until the stream finally appears and the error stops. What does Janus doesn’t like about the packets? That I already stopped rtp forwarding and now start rtp forwarding again for a stream with the same SSRC in VideoRoom?

[Thu May 15 14:58:25 2025] [ERR] [plugins/janus_streaming.c:janus_streaming_relay_thread:9677] [mp-09176781-9ebb-4fea-98bf-299f93ee5b04] Audio (#80) SRTP unprotect error: srtp_err_status_replay_old (len=333–>333, ts=1416000, seq=1476)

[Thu May 15 14:58:25 2025] [ERR] [plugins/janus_streaming.c:janus_streaming_relay_thread:9768] [mp-09176781-9ebb-4fea-98bf-299f93ee5b04] Video (#81) SRTP unprotect error: srtp_err_status_replay_old (len=57–>57, ts=2658000, seq=1698

Update: I now set a new random SSRC during RTP forwarding and issue is solved!

“ssrc” : <SSRC to use to use when forwarding; optional, and only for RTP streams, not data>,

If you change source but the SSRC remains the same, the Streaming plugin won’t update the headers to keep them consistent. The SRTP errors you see are caused by incorrect sequence numbers, because the new packets are not in the order they’re expected to be. As such, nothing wrong in Janus, it’s the stream that was wrong, and enforcing a different SSRC was the right thing to do.

1 Like