Janus and h264 on Android

Hi,

I’m developing a chat / call application in react-native. For calling I’m using Janus gateway. I’d really like to have a common h/w supported video format between web / mobile (both iOS and Android) so that we don’t have to use software decoders.

Settled on h264, as it seems to be documented as having hardware support across the board. iOS 10+ supports it, I think just about every browser supports it and Android is supposed to support it, from what I’ve read, from Honeycomb onwards.

However, when creating an offer SDP to send to Janus from Android, there is never any mention of the h264 codec. I’ve tried this from the Android AVD from Android Studio (which is simulating the Pixel 3), a physical device in a Nokia 3, which admittedly is about 4 years old, a Fairphone 3 (which I think is about 2 years old) and all of them have the same issue.

The SDP seems to offer VP8, VP9 and nothing else. Is there anything I have to do to enable h264 when creating an offer?

VP8 does work but there’s no hardware support for it in iOS and really don’t like the idea of using s/w decoding on multiple video streams in a group call.

I appreciate that the Nokia 3 might not have h/w encoding as it’s a MediaTek SoC but, the Fairphone 3 is a Qualcom device, so should definitely have hardware support.

A typical SDP that I’m seeing from android is along these lines:

v=0
o=- 3005012469418028420 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE video
a=msid-semantic: WMS b0164d43-a6ed-4ea6-aa6a-b2159930e157
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:4a3Z
a=ice-pwd:2OPz/YOb4EyM/KK4KXxAwOFy
a=ice-options:trickle renomination
a=fingerprint:sha-256 9E:57:56:62:B4:92:77:54:8D:FB:57:CC:F1:C2:D1:41:BB:65:93:94:B0:AC:86:CF:4F:85:8B:70:E8:EB:F2:92
a=setup:actpass
a=mid:video
a=extmap:1 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 urn:3gpp:video-orientation
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 red/90000
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 ulpfec/90000
a=ssrc-group:FID 2956772981 3082773025
a=ssrc:2956772981 cname:XZGzaNFhbDJwWlzH
a=ssrc:2956772981 msid:b0164d43-a6ed-4ea6-aa6a-b2159930e157 486c0554-7527-472f-b098-fbbb895e1914
a=ssrc:2956772981 mslabel:b0164d43-a6ed-4ea6-aa6a-b2159930e157
a=ssrc:2956772981 label:486c0554-7527-472f-b098-fbbb895e1914
a=ssrc:3082773025 cname:XZGzaNFhbDJwWlzH
a=ssrc:3082773025 msid:b0164d43-a6ed-4ea6-aa6a-b2159930e157 486c0554-7527-472f-b098-fbbb895e1914
a=ssrc:3082773025 mslabel:b0164d43-a6ed-4ea6-aa6a-b2159930e157
a=ssrc:3082773025 label:486c0554-7527-472f-b098-fbbb895e1914