Skip to content
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

Missing simulcast statistics in eventhandler connection for firefox #2610

Closed
JanFellner opened this issue Mar 30, 2021 · 5 comments
Closed

Comments

@JanFellner
Copy link
Contributor

Hi,

i started using the websocket event handler to get to know about statistics of the different PCs.
While implementing this i am removing code from the admin API i used to poll for these statistics.
I now humble over something i did not notice before but also looks like an issue in the admin api or at least a different behaviour.

I create a peerConnection from FireFox to the videoroom (using unified-plan / transceiver).
I add audio and video (including simulcast). Everything is working fine.

Using the admin api i can now poll for the stats and i receive statisics about the different simulcast layers BUT the rtcp_stats video-sim1, video-sim2 structs are missing. I did not really care about those so far as i was only interested in the traffic on the simulcast layers which are located in the in_stats. If i remove the video stream and add it again the missing structs are in the admin result data.

The interesting thing is that the websocket implementation does not offer me (likely due to the missing rtcp_stats elements) any information about simulcast at all. I do only see the video-sim1, video-sim2 events if i remove/add the stream.

I pasted the admin poll blob on pastebin:
https://pastebin.com/TB9x5Xv9 - initial admin poll payload after adding the video for the 1.st time
https://pastebin.com/2rE2zVBQ - admin poll payload after removing and adding the video for the 2.nd time

On chrome everything is working straight forward. Did not check safari so far (would do tomorrow)

Jan

@lminiero
Copy link
Member

How are you enabling simulcast in Chrome? Munging or rid? If it's the former, have you tried using simulcast2=true in demos, as that's closer to how Firefox implements simulcast?

@JanFellner
Copy link
Contributor Author

Hi Lorenzo,

i am using the way you propose it in your samples (chrome uses munging, firefox uses the api) but i already had using the sample in mind. Will recheck and post here.

Jan

@lminiero
Copy link
Member

No need, I just made an EchoTest from Chrome with simulcast2=true and could replicate. I have a guess on what may be the cause, so I'll let you know if I have a fix.

@lminiero
Copy link
Member

lminiero commented Mar 31, 2021

The above commit fixes it for me on Chrome. Haven't tested on other browsers, but I'm pretty sure the cause was the same: missing SSRCs when using rid-based simulcast, that would then prevent the simulcast RTCP contexts from being created, and those are used for the stats you found missing. It worked after a renegotiation before since at that stage we did have an SSRC (figured out at runtime).

@JanFellner
Copy link
Contributor Author

Looks good, just checked out master working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants