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

[stable30] Fix (known) false positives in connection warning #14251

Merged
merged 6 commits into from
Jan 30, 2025

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Jan 30, 2025

Backport of PR #14095

Chromium does not provide "packetsReceived" in "remote-inbound-rtp"

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When the initial stats reports are added the first value of cumulative
stats is used as a base when converting the rest of values to relative.
Therefore, that initial value is not meaningful and should not be used
in calculations, as otherwise the reported quality would be off. Due to
that now no quality is reported until the values of the first report
added were shifted.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
In the past it was observed that the timestamp and round trip time were
updated when the stats stalled (so only the received packets actually
stalled). However, nowadays it seems that the timestamp and round trip
time can also stall. This caused the stalled timestamp to be computed as
0, and that in turn messed with the rest of calculations (for example,
generating a NaN for the number of packets per second) and causing a
"very bad quality" to be wrongly reported. To solve that now the
timestamps are evenly distributed when they unstall.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
In the past it was observed that, even for small videos, 10 packets per
second was a reasonable threshold to detect connection issues even if
there were no lost packets. However, nowadays it seems that it can
sometimes trigger a false positive (typically when the background blur
is enabled and the video quality is reduced due to being in a call with
several participants), so for now the connection problem is no longer
reported to the user but just logged.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Due to a bug in Firefox and/or Janus, when using simulcast video the
remote report for one of the streams (typically the lowest quality one)
may start with garbage values. This causes the received packet count to
be reported the maximum integer value minus the packet lost count (which
is usually around a few thousands). When newer stats arrive the received
packets start to increase from that extremely high value, and eventually
it overflows, causing the received packet count to go back from
~4294967295 to ~0.

In other cases it was seen that the received packet count can regress a
few values, although it is not clear when or why (this was much rarer
and not reproducible, unlike the scenario described above).

To prevent the regressed value from distorting the analysis due to the
packet count being < 0, and as in both cases once the packet count
regressed the received packet count in all following stat reports
increase from the regressed value, now the stats are reset when a lower
packet count is found.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@danxuliu danxuliu merged commit ae4e70e into stable30 Jan 30, 2025
46 checks passed
@danxuliu danxuliu deleted the backport/14095/stable30 branch January 30, 2025 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant