fldy
fldy

Reputation: 205

How to enable H264 on Android webRTC

How to enable H264 on Android WebRTC.
PeerConnection to createOffer there was no h264 description in SDP.

Upvotes: 6

Views: 5476

Answers (3)

user7810992
user7810992

Reputation:

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.

Upvotes: 2

jamix
jamix

Reputation: 5628

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.

Upvotes: 2

Peter G.
Peter G.

Reputation: 104

H.264 works with WebRTC in Chrome on Android M57.

Upvotes: -1

Related Questions