-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.x] Remote publishers Switch problem #3444
Comments
I gave it some thought yesterday and I think it's due to the fact that all remote publishers use the same SSRCs, since a simple math is used to then figure out which packet belongs to which m-line: as a result, a switch would not recognize the source change since the SSRC is the same, and the different sequence number/timestamp space would lead to the SRTP errors. I'll have to figure out if that's indeed the cause by looking at the code, though, and I'll try and do that on Monday. |
@lminiero any updates? we could provide any info to help fix this |
Looking at the code it's very likely what I wrote in my previous post: when you use The problem, now, is that all remote publishers are created the same way and follow the same logic. This means that when you use I think there are a couple of ways to deal with this:
I'll start exploring option 2. and I'll prepare a PR when I think I have it. If you have other ideas please feel free to make suggestions. |
Maybe make offset based on publisher_id? it's guarantied to be unique, since two publishers can't have the same publisher_id in the same room |
publisher_id is 64-bit, SSRCs are 32-bit. There would be a higher chance of conflict due to the truncating. Besides, publisher_id could be a string and not numeric. I've just prepared a PR on my approach 2. and it seems to be working, pushing it shortly. |
we tested it and it doesn't work, video doesn't play at all. In logs we got repeating messages:
|
I had forgotten to add the offset to the SSRCs in the simulcast array too, should work now. |
it works perfectly now! thank you! |
Yes, switch for remote publishers now works as good as for local, thanks! |
Ack, thank you both for the feedback, I'll merge then. |
What version of Janus is this happening on?
1.3
Have you tested a more recent version of Janus too?
Tested on latest version.
Additional context
Switches for remote publishers leads to lost packets. Additional info here: https://janus.discourse.group/t/remote-publishers-switch-problem/1319
The text was updated successfully, but these errors were encountered: