Webrtc startup resolution on Android

351 views
Skip to first unread message

Alex Cohn

unread,
Mar 2, 2022, 4:09:15 AM3/2/22
to discuss-webrtc
Using webrtc on mobile Chrome (Android). I request 1280×720 video, and the video track does report requested resolution of 1280×720, but the camera frames are delivered to the other peer at lower res, slowly building up (the pace of this build-up depends on the device; for some devices like Redmi Note the full resolution is never achieved).

Is there a way to control this? At least, force the system to catch up with the required resolution faster? Maybe switching from webview to react-native implementation can help?

Note that on iOS 15.3 (in mobile Safari), the video stream begins at full declared resolution of 1280×720.

Thanks,
Alex Cohn

Lorenzo Miniero

unread,
Mar 19, 2022, 7:19:26 AM3/19/22
to discuss-webrtc
Resolution not being fixed and starting lower is expected, since the bandwidth estimation may need some time before it figures out the available bandwidth, and so starts with lower values conservatively. I haven't checked this yet, but it looks like you can maybe force the resolution not to change via some constraints:

I don't know if all browsers implement this, though, and if/how well this works.

L.

Alex Cohn

unread,
Mar 28, 2022, 1:46:11 PM3/28/22
to discuss-webrtc
Thanks, I could set https://www.w3.org/TR/mst-content-hint/#idl-def-VideoContentHint.detail for my video track. This seems to improve the behavior in mobile Chrome on Android on some devices. I will continue to experiment with this.

BR,
Alex

Reply all
Reply to author
Forward
0 new messages