Mixedreality-webrtc: Get network data amount (Mbps) during WebRTC usage

Created on 18 Nov 2019  路  5Comments  路  Source: microsoft/MixedReality-WebRTC

Hello everybody, and sorry for the n00b question.

Is it possible to know how much data (in Mbps) has been received and sent during a WebRTC session? Or maybe, is it possible to intercept how much data has been transferred for a single call?

I need to know how much data has been used from both the instances involved in the WebRTC connection, for both incoming and outgoing operations.

Thank you very much for your help!

Cheers
Riccardo

enhancement

Most helpful comment

Thank you so much for your help. At the moment I'm fine even without the Mbps information.
I look forward to the next updates of the tool so that I can add information to my project as soon as they are available. Thanks for your great job!

All 5 comments

Hi @CabbageWarrior, this is maybe available via the WebRTC Stats API but it's not currently exposed. Do you need the total network usage, or the encoded audio and/or video frame sizes? Does this include data channels or not? What about the feedback loop (SRTCP)?

Hi @djee-ms, thank you very much for your reply!
In my personal case, I need to log and show how much Mbps are sent and received for single user during the session. At the moment we are using only the video transmission (no audio or data).
This application is growing during time, so I think that in the next months we would be asked to give more specific infos, but for this sprint I need only to know the Mbsp stuff.
I'm sorry but at the moment I don't know if we would need infos about data channels and the feedback loop.

Please let me know if you need more informations, so I can ask them to the right people!

No I think that's good for now. I think _a priori_ that you could do with the stats available in the WebRTC Stats API, which is at least partly implemented in the Google code. In particular it sounds like you would be interested in the RTCTransportStats.

This would require us exposing those publicly through the MixedReality-WebRTC API. This is probably not too complicated hopefully, but I don't think we can prioritize that before the end of your sprint unfortunately. Though we do have interest in implementing a feature like this to expose some stats.

Thank you so much for your help. At the moment I'm fine even without the Mbps information.
I look forward to the next updates of the tool so that I can add information to my project as soon as they are available. Thanks for your great job!

@CabbageWarrior you can now get part of the WebRTC stats with GetSimpleStatsAsync. If you want the traffic for the whole connection I'd say the best way should be to get total bytes sent/received in the TransportStats, and use the stats timestamps to convert to Mbps.

Was this page helpful?
0 / 5 - 0 ratings