Re: [webrtc-pc] API for codec performance (#2241)

Being able to tell which codecs are not only possible to use, but are also "smooth" or "efficient", even _before_ you request to use them is something that would be incredibly valuable. Many applications attempt to send HD, not even knowing if the codec has HW or SW support, and relying on degradation to "back down" if we are unable to send it. But like you said, by then you may already have had a bad experience. If you're on a laptop this means it will likely start sounding like a helicopter (at least in Chrome) - it will do what you asked for, but it is likely not the most optimal experience. I just did some CPU measurements and profiling of WebRTC Video in Chrome, and well, it's expensive.

It's good to have an API to let the application do the decision. For example, one application might value quality over everything, in which case being efficient is not a problem as long as it is smooth. Other applications might want to value efficiency over smoothness, as to not drain the battery.

I think even low-hanging fruit like "do we have HW support?" would be of great benefit, and other codec-specific properties. If we could tell what was "smooth" or "efficient" that would be amazing, it does make me wonder - how would we know? WebRTC applications can differ widely in complexity, including 1-1 video calls, or audio calls, or a 10 people all calling in to the same conference with HD cameras. All the [MediaCapabilitiesInfo](https://w3c.github.io/media-capabilities/#media-capabilities-info)s sound very binary. Could [MediaEncodingConfiguration](https://w3c.github.io/media-capabilities/#dictdef-mediaencodingconfiguration) be extended to make more precise quarries to the API, indicating if you are doing 1:1 or 1:10, for instance?

I don't think we should let "perfect" be the enemy of progress/"good enough". As-is, WebRTC could greatly benefit by richer Media Capabilities, and I would be very interested to join in any discussions around these APIs.

-- 
GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2241#issuecomment-517215616 using your GitHub account

Received on Thursday, 1 August 2019 09:56:47 UTC