0

I've developed an Android app using WebRTC M90.0.1. I can see that from DefaultVideoEncoderFactory supportedCodecs includes VP8, VP9, and H264 but I don't see how to set a preferred codec (as can be done in iOS WebRTC)? In particular I would like to be able to set VP9 as the preferred codec.

Any help would be greatly appreciated.

dchappelle
  • 1,580
  • 2
  • 13
  • 22

1 Answers1

0

There is an example how to activate appropriate codec implementing VideoEncoderFactory interface: https://github.com/RiV-chain/CupLink/blob/unlock-hw-codecs/app/src/main/java/org/webrtc/HardwareExtendedVideoEncoderFactory.kt#L82

Also you may unlock hardware codecs despite it was locked out by google: uncomment following line and comment out the next one

https://github.com/RiV-chain/CupLink/blob/unlock-hw-codecs/app/src/main/java/org/webrtc/HardwareExtendedVideoEncoderFactory.kt#L179