Question

I've been working on a WebRTC videoconferencing app which is working great, taking into account the current state of WebRTC.

However, I have been exploring the possibilities to add constraints to the video and audio streams being send over by PeerConnection. More specific in improving the performance of the video. When videoconferencing on old (slow) laptops, we noticed that the quality of the image is really high but the frame per second is low. The stream is hacky. About the audio quality, we give it a 8,5 for Chrome but only a 5,5 to 6 for Firefox.

I am not really interested in applying constraints to getUserMedia since this stream is being shown to the user aswell, and we don't want to change anything about this local output. (Unless there isn't another way)

I have found alot of information on W3G's drafts about MediaStreams and WebRTC itself. These define certain constraints like default fps, minfps, minwidth and minheight of the image. On webrtc.org is also alot of information available like choosing codec etc. But these settings can only be made "under the hood". It seems these settings cannot be addressed from RTCPeerConnection API level?

Certain examples on the net manipulate the SDP strings in the Offer / Answer part of the WebRTC handshake, is this the way to go ?

TL;DR : How to apply - and What is the best way to apply - constraints on WebRTC like minfps, maxfps, default fps, minwidth, maxwidth, dpi of image, bandwidth of video and audio, audio KHz and any other way to improve performance or quality of the stream(s).

Big thanks in advance !

Was it helpful?

Solution

Right now, most of those can't be set in Firefox or Chrome. A few can be adjusted (with care/pain) in the SDP, but even if there's an SDP option defined for something it doesn't mean that the browsers look at it.

Both Mozilla and Google are looking to improve CPU overload detection and reaction (reduce frame size dynamically, etc). Right now, this effectively isn't being done. Upcoming releases of FF (FF24) will adapt to the capture resolution (as a maximum), but we don't have constraints for that yet, just about:config prefs (see media.*). That would allow you to set a different default resolution for Firefox.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top