简体   繁体   中英

How to enable H264 on Android webRTC

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.

Edit: Removed proprietary information that I mistakenly thought I could link to 😬

H.264 在 Android M57 上的 Chrome 中与 WebRTC 配合使用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM