How to enable H264 on Android WebRTC.PeerConnection
to createOffer
there was no h264 description in SDP.
Google's current WebRTC implementation only supports hardware H.264 decoding and encoding on Android, and with select chipsets only. So if a particular device doesn't have hardware H.264 support or has an unsupported chipset, you'll only get VP8/VP9.
Google blocks their own software codecs by default, for some reason, so if you don't have hardware decoding in your chipset (or if you use an emulator), you will get no h264 codecs when webrtc checks for them.
If you go into the webrtc code and remove "OMX.google" from https://chromium.googlesource.com/external/webrtc/+/HEAD/sdk/android/src/java/org/webrtc/MediaCodecUtils.java#33 then create a custom build of webrtc for android based off that code, the software encoder will be unblocked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With