Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Monitor WebRTC video (media) stream quality in Javascript

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?

like image 311
Mark Tolmacs Avatar asked Jul 30 '14 11:07

Mark Tolmacs


People also ask

How do I control video quality in WebRTC?

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.

How do I increase video quality in WebRTC?

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.

What is bitrate in WebRTC?

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.

Is WebRTC a JavaScript?

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.


1 Answers

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.

like image 181
Dr. Alex Gouaillard Avatar answered Nov 15 '22 00:11

Dr. Alex Gouaillard