We use OBS to inject a WHIP stream into Janus videoroom and it works fine and great.
We use Streaming plugin to rtp forward for scaling and works fine the first time when stream is started from OBS.
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.
If I quit OBS, and start the stream it works fine immediately on the Streaming plugin.
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.
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?
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?
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.