Android WebRTC - createAnswer() is missing recvonly video

144 views
Skip to first unread message

Sean Horton

unread,
Mar 21, 2023, 3:14:53 AM3/21/23
to discuss-webrtc
I'm trying to receive video on Android with native WebRTC. WebRTC was built from 5481.

Below is the sdp offer from a janus server and then android's answer.

Android's answer is missing "BUNDLE video" and other codec options.

The below offer is type "[...]SAVPF 96 97", which android does not make an appropriate answer for. However, if the janus offer is instead "[...]SAVPF 98 99" android seems to correctly create an answer.

OFFER FROM JANUS:
    v=0
    o=- omitted 1 IN IP4 omitted
    s=Mountpoint omitted
    t=0 0
    a=group:BUNDLE video
    a=msid-semantic: WMS janus
    m=video 9 UDP/TLS/RTP/SAVPF 96 97
    c=IN IP4 omitted
    a=sendonly
    a=mid:video
    a=rtcp-mux
    a=ice-ufrag:omitted
    a=ice-pwd:omitted
    a=ice-options:trickle
    a=fingerprint:omitted
    a=setup:actpass
    a=rtpmap:96 H264/90000
    a=fmtp:96 pachetization-mode-1
    a=rtcp-fb:96 nack
    a=rtcp-fb:96 nack pli
    a=rtcp-fb:96 goog-remb
    a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
    a=rtpmap:97 rtx/90000
    a=fmtp:97 apt=96
    a=ssrc-group:FID omitted omitted
    a=msid:janus janusv0
    a=ssrc:omitted cname:janus
    a=ssrc:omitted msid:janus janusv0
    a=ssrc:omitted mslabel:janus
    a=ssrc:omitted label:janusv0
    a=ssrc:omitted cname:janus
    a=ssrc:omitted msid:janus janusv0
    a=ssrc:omitted mslabel:janus
    a=ssrc:omitted label:janusv0
    a=candidate:1 1 udp omitted omitted omitted typ host
    a=end-of-candidates


ANSWER FROM ANDROID:
    v=0
    o=- omitted 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE
    a=msid-semantic: WMS
    m=video 0 UDP/TLS/RTP/SAVPF 0
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:omitted
    a=ice-pwd:omitted
    a=ice-options:trickle renomination
    a=fingerprint: omitted
    a=setup:active
    a=mid:video
    a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
    a=recvonly
    a=rtcp-mux


I can manually edit the android answer to include the below, and video correctly plays:
    ...
    a=group:BUNDLE video
    m=video 9 UDP/TLS/RTP/SAVPF 96 97
    ...
    a=rtpmap:96 H264/90000
    a=rtcp-fb:96 goog-remb
    a=rtcp-fb:96 nack
    a=rtcp-fb:96 nack pli
    a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
    a=rtpmap:97 rtx/90000
    a=fmtp:97 apt=96


I'm not sure if their is a reason the answer is not automatically generating an sdp with "BUNDLE video". It doesn't seem appropriate for me to manually add the extra video options. 

Philipp Hancke

unread,
Mar 21, 2023, 3:18:05 AM3/21/23
to discuss...@googlegroups.com
Your offer from Janus seems to lack a profile-level-id which makes libwebrtc think there are no common codecs.

You are applying the edits between createAnswer and setLocalDescription and that works?!

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/eeb205f1-5c14-42ae-8687-44a0d3cea918n%40googlegroups.com.

Sean Horton

unread,
Mar 21, 2023, 8:44:25 AM3/21/23
to discuss-webrtc
Thanks! That helped me find the issue. 

The offer from janus has a typo. The offer says "pachetization-mode-1", but should be "packetization-mode=1"

Regardless, to answer your question. Yes, I was doing,
- setRemoteDescription
- createAnswer
- edit the answer
- setLocalDescription

and it was working. But, after fixing the typo it's working as expected.
Thanks again. 
Reply all
Reply to author
Forward
0 new messages