webrtcopenvidu

What is the difference between inbound-rtp & remote-inbound-rtp in the results we get from webrtc getstats?


I have been trying to figure out a way to calculate the following: Bandwidth, Latency, Current Upload, and Download speed. And have been confused with the values I am getting for the INBOUND-RTP, OUTBOUND-RTP, & REMOTE-INBOUND-RTP.

In my head, I was thinking about inbound-rtp as a collection of stats for all incoming data. which apparently is wrong, since different stats for that type always stays Zero

The current setup uses chrome as a 2 connecting Clients, and a Media Server, with client instances running on "localhost"

enter image description here


Solution

  • The terminology used on MDN is a bit terse, so here's a rephrasing that I hope is helpful to solve your problem! Block quotes taken from MDN & clarified below. For an even terser description, also see the W3C definitions.

    outbound-rtp

    An RTCOutboundRtpStreamStats object giving statistics about an outbound RTP stream being sent from the RTCPeerConnection.

    This stats report is based on your outgoing data stream to your peers. This is the measurement taken from the perspective of just that oubound RTP stream, which is why information that involves your peers (round trip time, jitter, etc.) is missing, because those can only be measured with an understanding of the peer's processing of your stream.

    inbound-rtp

    Statistics about an inbound RTP stream that's currently in use by this RTCPeerConnection, in an RTCInboundRtpStreamStats object.

    By contrast to the Outbound RTP statistics, this stats report contains data about the inbound data stream you are receiving from your peer(s). Notice that if you do not have any connected peers your call to getStats does not include this report type at all.

    remote-inbound-rtp

    Contains statistics about the remote endpoint's inbound RTP stream; that stream corresponds to the local endpoint's outbound RTP stream. Using this RTCRemoteInboundRtpStreamStats object, you can learn how the well the remote peer is receiving data.

    This stats report provides details about your outbound rtp stream from the perspective of the remote connection. That is to say that this stats report provides an analysis about your outbound-rtp stream from the perspective of the remote server that is handling your stream on the other side.