Simulcast on Android Chrome doesn't work when Hardware Encoding/Decoding is enabled.

Skip to first unread message

Vinayak V Kulkarni

Aug 5, 2022, 9:41:17 AM (9 days ago) Aug 5
to discuss-webrtc
Hi Team,

On Android Chrome it is observed that simulcast doesn't work when using Hardware Encoding/Decoding. 
We try to set the simulcast parameters in the encodings of videoRtpSender using setParameters and addTransceiver method, but it is not taking any effect.
We try to scale down the resolution by 2, 4 and 8 in the 3 simulcast layers but the android chrome client still sends the same resolution in which the video was captured.

We see there is a bug already raised.
"HardwareVideoEncoder cannot scale incoming frames, thus breaking simulcast configuration."

When we disable Hardware Encoding/Decoding on the android mobile using chrome://flags - we see simulcast is working fine. (Please see attached screenshot)

Can you please let us know how to use simulcast when using the default configuration  on Android Chrome browser(i.e Hardware Encoding/Decoding)
Also if there is any way to ask chrome to use software encoder/decoder programmatically, please let us know. 

PS: This issue is not seen on IOS devices.
Any info on this aspect would be appreciated.


Angelika Serwa

Aug 12, 2022, 12:10:49 PM (2 days ago) Aug 12
to discuss-webrtc
Hi, we have similar issue. For software encoders everything works fine. For hardware encoders on Android all layers have the same resolution, as original resolution. We reproduced this in m104, m97 versions. On m93 layers have correct resolutions.

Moreover, when switching layers, in some configurations video is not being sent. For example:
- send 3 layers initially (h, m, l resoulutions)
- disable h and m layers (by setting encoding.enabled = false in peer connection)
- l resolution should still be sent, instead no layer is sent

@vinay we set software / hardware encoders programatically using this code
you can pass SoftwareVideoEncoderFactory as primary encoder in SimulcastVideoEncoderFactory constructor

Cameron Lucas

Aug 12, 2022, 12:11:24 PM (2 days ago) Aug 12
to discuss-webrtc
We have noticed the same issue Though, it looks like Chrome (on Android), specifically, seems to be affected by this bug

- Cameron
Reply all
Reply to author
0 new messages