I'm using WebRTC to stream video between peers, but changes in network conditions for some clients often produce quality changes in the received video stream. People blame the service for these quality drops and clearly I (the service) cannot do anything about their network conditions. But showing an indication that the quality dropped due to network conditions on the client's end would most likely alleviate this problem.
I've been searching Google & Stackoverflow for a while now and haven't seen any questions related to quality detection of incoming audio or video stream. Is there a way to monitor the quality (current bitrate or dropped frames, anything) during the live stream?
You can put a cap on bitrate for a webrtc connection by added a bitrate attribute to the SDP before setting it as local and sending it to the remote party.
Making a choice between resolution and frame rate If possible, go for VBR instead of the default CBR in WebRTC. Assuming you're in the talking-heads domain, a higher frame rate is the better selection. 30fps is what we're aiming for, but if the bitrate is low, you will need to lower that as well.
In the context of VoIP (and WebRTC), bitrate is the number of bits per second that are being actively sent or received over the network. A few things to remember about bitrate: The maximum bitrate possible is capped by the bandwidth available, which can be dynamic throughout a single session.
WebRTC provides software developers with application programming interfaces (APIs) written in JavaScript. Developers use these APIs to create peer-to-peer (P2P) communications between internet web browsers and mobile applications without worrying about compatibility and support for audio-, video- or text-based content.
The getStats() API is what you are looking for if you want to programmatically access information in real time. webrtc-internals is a separate webpage, that is providing you more informations than getstats because it has access to chrome internals, but eventually most of those info will be made available to getstats so people can have access to them from within their app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With