webrtc: handle BUNDLED mlines with different ice credentials
Describe your issue
follow up of this discussion
I've this error
$ gst-launch-1.0 playbin uri=gstwebrtc://127.0.0.1:8443?peer-id=1e548974-6f18-4048-9512-c06fc9bc181b
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.328539923 58928 0x56249944f000 WARN webrtcbin gstwebrtcbin.c:6671:_set_description_task:<webrtcbin0> returning error: media 1 has different ice-ufrag values in bundle. CQci != qvCg**
0:00:00.328561666 58928 0x56249944f000 WARN webrtcbin gstwebrtcbin.c:4794:_create_sdp_task:<webrtcbin0> returning error: Asked to create an answer without a remote description
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstWebRTCSrc:source: GStreamer encountered a general stream error.
Additional debug info:
net/webrtc/src/webrtcsrc/imp.rs(812): gstrswebrtc::webrtcsrc::imp::WebRTCSrc::on_answer_created (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstWebRTCSrc:source:
create-answer::Promise returned with no reply
Execution ended after 0:00:00.234683472
Setting pipeline to NULL ...
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstWebRTCSrc:source: GStreamer encountered a general stream error.
Additional debug info:
net/webrtc/src/webrtcsrc/imp.rs(569): gstrswebrtc::webrtcsrc::imp::WebRTCSrc::connect_signaller::{{closure}}::{{closure}} (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstWebRTCSrc:source:
Signalling error: Error receiving: WebSocket protocol error: Connection reset without closing handshake
Freeing pipeline ...
When using this client gst-launch-1.0 playbin uri=gstwebrtc://127.0.0.1:8443?peer-id=[Client ID]
with a custom producer (aiortc) that sends 2 tracks (2 videos, or 1 video and 1 audio)
Setup
- Operating System: Linux Debian 12
- Device: Computer
- GStreamer Version: debian package version 1.22. Rust plugin 0.11.0
- Command line: gst-launch-1.0 playbin uri=gstwebrtc://127.0.0.1:8443?peer-id=[Client ID]
How reproducible is the bug?
Systematic
Solutions you have tried
No issue with the web browser client (provided in the rust plugins repo), or a custom Unity webrtc client.
Additional Information
Here's the webrtc log
Setting pipeline to PAUSED ...
0:00:00.106452641 e[35m98650e[00m 0x565166b01b60 e[37mDEBUG e[00m e[00m webrtcnice nice.c:1404:gst_webrtc_nice_set_stun_server:<webrtcbin0:ice>e[00m setting stun server, stun://stun.l.google.com:19302
0:00:00.106509063 e[35m98650e[00m 0x565166b01b60 e[37mDEBUG e[00m e[00m webrtcbin gstwebrtcbin.c:7848:gst_webrtc_bin_change_state:e[00m changing state: NULL => READY
0:00:00.106606378 e[35m98650e[00m 0x565166b01b60 e[33;01mLOG e[00m e[00m webrtcbin gstwebrtcbin.c:1725:_check_if_negotiation_is_needed:<webrtcbin0>e[00m checking if negotiation is needed
0:00:00.106609465 e[35m98650e[00m 0x565166b01b60 e[33;01mLOG e[00m e[00m webrtcbin gstwebrtcbin.c:1741:_check_if_negotiation_is_needed:<webrtcbin0>e[00m no local description set
0:00:00.106619252 e[35m98650e[00m 0x565166d46800 e[37mTRACE e[00m e[00m webrtcbin gstwebrtcbin.c:1850:_check_need_negotiation_task:<webrtcbin0>e[00m emitting on-negotiation-needed
0:00:00.106632393 e[35m98650e[00m 0x565166b01b60 e[37mDEBUG e[00m e[00m webrtcbin gstwebrtcbin.c:7848:gst_webrtc_bin_change_state:e[00m changing state: READY => PAUSED
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.106749803 e[35m98650e[00m 0x565166b01b60 e[37mDEBUG e[00m e[00m webrtcbin gstwebrtcbin.c:7848:gst_webrtc_bin_change_state:e[00m changing state: PAUSED => PLAYING
0:00:00.106773020 e[35m98650e[00m 0x565166b01b60 e[36mINFO e[00m e[00m webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:525:<gstrswebrtc::signaller::imp::Signaller as gstrswebrtc::signaller::iface::SignallableImpl>::start:<GstWebRTCSignaller@0x565166db3130>e[00m Starting
0:00:00.107145221 e[35m98650e[00m 0x565166b01b60 e[36mINFO e[00m e[00m webrtcsrc net/webrtc/src/webrtcsrc/imp.rs:931:gstrswebrtc::webrtcsrc::imp::WebRTCSrc::maybe_start_signaller:<source>e[00m Started signaller
New clock: GstSystemClock
0:00:00.107628940 e[35m98650e[00m 0x7fdbfc003430 e[36mINFO e[00m e[00m webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:133:gstrswebrtc::signaller::imp::Signaller::connect::{{closure}}:<GstWebRTCSignaller@0x565166db3130>e[00m connected
0:00:00.107685807 e[35m98650e[00m 0x7fdbfc003430 e[37mTRACE e[00m e[00m webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:263:gstrswebrtc::signaller::imp::Signaller::handle_message:<GstWebRTCSignaller@0x565166db3130>e[00m Received message {"type":"welcome","peerId":"2e761115-4218-46db-bce1-bc75d74c3040"}
0:00:00.107702662 e[35m98650e[00m 0x7fdbfc003430 e[36mINFO e[00m e[00m webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:248:gstrswebrtc::signaller::imp::Signaller::start_session:<GstWebRTCSignaller@0x565166db3130>e[00m Started session with producer peer id 9669718e-9c73-4352-a9f2-a23dbed9bf34
0:00:00.107714266 e[35m98650e[00m 0x7fdbfc003430 e[33;01mLOG e[00m e[00m webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:144:gstrswebrtc::signaller::imp::Signaller::connect::{{closure}}::{{closure}}:e[00m Sending websocket message StartSession(StartSessionMessage { peer_id: "9669718e-9c73-4352-a9f2-a23dbed9bf34" })
0:00:00.107734374 e[35m98650e[00m 0x7fdbfc003430 e[33;01mLOG e[00m e[00m webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:144:gstrswebrtc::signaller::imp::Signaller::connect::{{closure}}::{{closure}}:e[00m Sending websocket message SetPeerStatus(PeerStatus { roles: [], meta: None, peer_id: Some("2e761115-4218-46db-bce1-bc75d74c3040") })
0:00:00.107885066 e[35m98650e[00m 0x7fdbfc003430 e[37mTRACE e[00m e[00m webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:263:gstrswebrtc::signaller::imp::Signaller::handle_message:<GstWebRTCSignaller@0x565166db3130>e[00m Received message {"type":"sessionStarted","peerId":"9669718e-9c73-4352-a9f2-a23dbed9bf34","sessionId":"14288230-5822-4412-9a70-8b0b28a72a06"}
0:00:00.107894481 e[35m98650e[00m 0x7fdbfc003430 e[36mINFO e[00m e[00m webrtcsrc net/webrtc/src/webrtcsrc/imp.rs:584:gstrswebrtc::webrtcsrc::imp::WebRTCSrc::connect_signaller::{{closure}}::{{closure}}:<source>e[00m Session started: 14288230-5822-4412-9a70-8b0b28a72a06
0:00:00.147820771 e[35m98650e[00m 0x7fdbfc003430 e[37mTRACE e[00m e[00m webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:263:gstrswebrtc::signaller::imp::Signaller::handle_message:<GstWebRTCSignaller@0x565166db3130>e[00m Received message {"type":"peer","sessionId":"14288230-5822-4412-9a70-8b0b28a72a06","sdp":{"type":"offer","sdp":"v=0\r\no=- 3905310572 3905310572 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=msid-semantic:WMS *\r\nm=video 47391 UDP/TLS/RTP/SAVPF 97 98 99 100\r\nc=IN IP4 10.0.1.32\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=mid:0\r\na=msid:10a2212a-5af8-43af-9e76-ca612824d182 left\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtcp-mux\r\na=ssrc-group:FID 279497956 2890277861\r\na=ssrc:279497956 cname:8fe1ac19-0a68-426a-831f-a501f513b4ad\r\na=ssrc:2890277861 cname:8fe1ac19-0a68-426a-831f-a501f513b4ad\r\na=rtpmap:97 H264/90000\r\na=rtcp-fb:97 nack\r\na=rtcp-fb:97 nack pli\r\na=rtcp-fb:97 goog-remb\r\na=fmtp:97 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:98 rtx/90000\r\na=fmtp:98 apt=97\r\na=rtpmap:99 H264/90000\r\na=rtcp-fb:99 nack\r\na=rtcp-fb:99 nack pli\r\na=rtcp-fb:99 goog-remb\r\na=fmtp:99 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:100 rtx/90000\r\na=fmtp:100 apt=99\r\na=candidate:5893c2de5def470b59e2c42c650ee78a 1 udp 2130706431 10.0.1.32 47391 typ host\r\na=candidate:073d76714234a72b1ea24a739a601abe 1 udp 2130706431 2a00:1028:8388:1986:ec33:a025:499:598e 41823 typ host\r\na=candidate:580b5f32035da7f14a30ea7a8d826c67 1 udp 2130706431 172.17.0.1 34199 typ host\r\na=candidate:0ad8db753210ce9554cf251a9e51e792 1 udp 1694498815 109.81.170.201 9556 typ srflx raddr 172.17.0.1 rport 34199\r\na=candidate:f0f7f4c0f6408ce370b03219e415cb8c 1 udp 1694498815 109.81.170.201 9583 typ srflx raddr 10.0.1.32 rport 47391\r\na=end-of-candidates\r\na=ice-ufrag:DGHn\r\na=ice-pwd:pS8HEZarePq3I7jQFM4iFu\r\na=fingerprint:sha-256 7D:AA:46:85:77:B4:83:38:87:09:78:1A:55:82:DF:F0:93:31:BE:7E:1A:FC:6A:52:BD:59:8E:9C:33:85:CB:65\r\na=setup:actpass\r\nm=video 36419 UDP/TLS/RTP/SAVPF 97 98 99 100\r\nc=IN IP4 10.0.1.32\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=mid:1\r\na=msid:10a2212a-5af8-43af-9e76-ca612824d182 right\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtcp-mux\r\na=ssrc-group:FID 807064486 2160864189\r\na=ssrc:807064486 cname:8fe1ac19-0a68-426a-831f-a501f513b4ad\r\na=ssrc:2160864189 cname:8fe1ac19-0a68-426a-831f-a501f513b4ad\r\na=rtpmap:97 H264/90000\r\na=rtcp-fb:97 nack\r\na=rtcp-fb:97 nack pli\r\na=rtcp-fb:97 goog-remb\r\na=fmtp:97 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:98 rtx/90000\r\na=fmtp:98 apt=97\r\na=rtpmap:99 H264/90000\r\na=rtcp-fb:99 nack\r\na=rtcp-fb:99 nack pli\r\na=rtcp-fb:99 goog-remb\r\na=fmtp:99 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:100 rtx/90000\r\na=fmtp:100 apt=99\r\na=candidate:5893c2de5def470b59e2c42c650ee78a 1 udp 2130706431 10.0.1.32 36419 typ host\r\na=candidate:073d76714234a72b1ea24a739a601abe 1 udp 2130706431 2a00:1028:8388:1986:ec33:a025:499:598e 53810 typ host\r\na=candidate:580b5f32035da7f14a30ea7a8d826c67 1 udp 2130706431 172.17.0.1 34433 typ host\r\na=candidate:0ad8db753210ce9554cf251a9e51e792 1 udp 1694498815 109.81.170.201 9667 typ srflx raddr 172.17.0.1 rport 34433\r\na=candidate:f0f7f4c0f6408ce370b03219e415cb8c 1 udp 1694498815 109.81.170.201 9706 typ srflx raddr 10.0.1.32 rport 36419\r\na=end-of-candidates\r\na=ice-ufrag:8uRQ\r\na=ice-pwd:GY9ttEEUxMTZFybPRCDAAx\r\na=fingerprint:sha-256 7D:AA:46:85:77:B4:83:38:87:09:78:1A:55:82:DF:F0:93:31:BE:7E:1A:FC:6A:52:BD:59:8E:9C:33:85:CB:65\r\na=setup:actpass\r\n"}}
0:00:00.148243804 e[35m98650e[00m 0x7fdbfc003430 e[33;01mLOG e[00m e[00m webrtcsrc net/webrtc/src/webrtcsrc/imp.rs:702:gstrswebrtc::webrtcsrc::imp::WebRTCSrc::handle_offer:<source>e[00m Got offer v=0
o=- 3905310572 3905310572 IN IP4 0.0.0.0
```