awslabs / amazon-kinesis-video-streams-webrtc-sdk-android

Android SDK for interfacing with Amazon Kinesis Video Streams Signaling Service.
Apache License 2.0
58 stars 37 forks source link

Failed to set remote video description send parameters #72

Closed ShadowsHunter closed 1 year ago

ShadowsHunter commented 2 years ago

Why do i get ‘Failed to set remote video description send parameters‘ when setting up RemoteDescription

Heae is the answer sdp received from master

v=0
    o=- 1223721084 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE 0 1 2
    a=msid-semantic: WMS myKvsVideoStream
    m=video 9 UDP/TLS/RTP/SAVPF 0
    c=IN IP4 127.0.0.1
    a=candidate:3 1 udp 16777215 0000:0000:0000:0000:0000:0000:0000:0000 0 typ relay raddr ::/0 rport 0 generation 0 network-cost 999
    a=candidate:2 1 udp 16777215 0000:0000:0000:0000:0000:0000:0000:0000 0 typ relay raddr ::/0 rport 0 generation 0 network-cost 999
    a=candidate:1 1 udp 1694498815 192.168.100.46 51603 typ srflx raddr 0.0.0.0 rport 0 generation 0 network-cost 999
    a=candidate:0 1 udp 2130706431 192.168.100.46 54688 typ host raddr 0.0.0.0 rport 0 generation 0 network-cost 999
    a=msid:myKvsVideoStream myVideoTrack
    a=ssrc:236188984 cname:mryq48NLCzSSrxjP
    a=ssrc:236188984 msid:myKvsVideoStream myVideoTrack
    a=ssrc:236188984 mslabel:myKvsVideoStream
    a=ssrc:236188984 label:myVideoTrack
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:4ECZ
    a=ice-pwd:H4c7FuVHZOdk8fSJNSm/Yvbf
    a=ice-options:trickle
    a=fingerprint:sha-256 68:F7:58:08:21:BD:F6:5E:82:BB:19:4E:06:C1:75:7B:AD:E8:2E:BA:E0:58:99:98:8F:F5:2B:25:27:FB:E5:D4
    a=setup:active
    a=mid:0
    a=sendrecv
    a=rtcp-mux
    a=rtcp-rsize
    a=rtpmap:0 H264/90000
    a=rtcp-fb:0 nack
    a=rtcp-fb:0 goog-remb
    a=rtcp-fb:0 transport-cc
    m=audio 9 UDP/TLS/RTP/SAVPF 111
    c=IN IP4 127.0.0.1
    a=candidate:3 1 udp 16777215 0000:0000:0000:0000:0000:0000:0000:0000 0 typ relay raddr ::/0 rport 0 generation 0 network-cost 999
    a=candidate:2 1 udp 16777215 0000:0000:0000:0000:0000:0000:0000:0000 0 typ relay raddr ::/0 rport 0 generation 0 network-cost 999
    a=candidate:1 1 udp 1694498815 192.168.100.46 51603 typ srflx raddr 0.0.0.0 rport 0 generation 0 network-cost 999
    a=candidate:0 1 udp 2130706431 192.168.100.46 54688 typ host raddr 0.0.0.0 rport 0 generation 0 network-cost 999
    a=msid:myKvsVideoStream myAudioTrack
    a=ssrc:1669510345 cname:mryq48NLCzSSrxjP
    a=ssrc:1669510345 msid:myKvsVideoStream myAudioTrack
    a=ssrc:1669510345 mslabel:myKvsVideoStream
    a=ssrc:1669510345 label:myAudioTrack
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:4ECZ
    a=ice-pwd:H4c7FuVHZOdk8fSJNSm/Yvbf
    a=ice-options:trickle
    a=fingerprint:sha-256 68:F7:58:08:21:BD:F6:5E:82:BB:19:4E:06:C1:75:7B:AD:E8:2E:BA:E0:58:99:98:8F:F5:2B:25:27:FB:E5:D4
    a=setup:active
    a=mid:1
    a=sendrecv
    a=rtcp-mux
    a=rtcp-rsize
    a=rtpmap:111 opus/48000/2
    a=fmtp:111 minptime=10;useinbandfec=1
    a=rtcp-fb:111 nack
    a=rtcp-fb:111 goog-remb
    a=rtcp-fb:111 transport-cc
    m=application 9 UDP/DTLS/SCTP webrtc-datachannel
    c=IN IP4 127.0.0.1
    a=candidate:3 1 udp 16777215 0000:0000:0000:0000:0000:0000:0000:0000 0 typ relay raddr ::/0 rport 0 generation 0 network-cost 999
    a=candidate:2 1 udp 16777215 0000:0000:0000:0000:0000:0000:0000:0000 0 typ relay raddr ::/0 rport 0 generation 0 network-cost 999
    a=candidate:1 1 udp 1694498815 192.168.100.46 51603 typ srflx raddr 0.0.0.0 rport 0 generation 0 network-cost 999
    a=candidate:0 1 udp 2130706431 192.168.100.46 54688 typ host raddr 0.0.0.0 rport 0 generation 0 network-cost 999
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:4ECZ
    a=ice-pwd:H4c7FuVHZOdk8fSJNSm/Yvbf
    a=fingerprint:sha-256 68:F7:58:08:21:BD:F6:5E:82:BB:19:4E:06:C1:75:7B:AD:E8:2E:BA:E0:58:99:98:8F:F5:2B:25:27:FB:E5:D4
    a=setup:active
    a=mid:2
    a=sctp-port:5000
sirknightj commented 1 year ago

Hey @ShadowsHunter, did you get any error codes?

Should look something like this:

E/KinesisVideoSdpObserver: onSetFailure(): Error=Failed to set remote offer sdp: Failed to set remote video description send parameters for m-section with mid='video1'.
E/KinesisVideoSdpObserver: onCreateFailure(): Error=Session error code: ERROR_CONTENT. Session error description: Failed to set remote video description send parameters for m-section with mid='video1'..

In this case of ERROR_CONTENT, it means your device (or emulator) does not support the any of the formats of the media that is being asking for:

 a=rtpmap:0 H264/90000