ckuhr
November 29, 2024, 10:02am
1
Hi *,
I am trying to create a receive only WebRTC client with GStreamer that connects to a Videoroom session. The clients run on the same host as janus.
gst-launch-1.0 version 1.25.0
GStreamer 1.25.0 (GIT)
I have tried WHIP and WHEP (simple-WH* client/server) without any luck. The WHIP examples work right away, but I failed to get WHEP working. I cannot even see the video in simple-WHEP-server preview.
I also tried whepsrc.
Now I am trying to get a webrtcbin managed by a python script to connect to the videoroom session.
All approaches finally fail with an error like this:
#0:00:00.032232235 27125 0x270f2a0 WARN webrtcbin gstwebrtcbin.c:3655:sdp_media_from_transceiver:<webrtcbin> Caps application/x-rtp, media=(string)video, encoding-name=(string)VP8, payload=(int)96, clock-rate=(int)90000, rtcp-fb-nack-pli=(boolean)true, rtcp-fb-ccm-fir=(boolean)true, rtcp-fb-transport-cc=(boolean)true are missing ssrc
I tried hardcoding the ssrc without any luck.
I am not able to pinpoint the problem.
Can anyone provide some help?
Thanks!
ckuhr
November 29, 2024, 10:09am
2
Here is the output of the latest webrtcbin approach:
ubuntu@ip-172-31-26-104:~$ GST_DEBUG="*:3,GST_PLUGIN_RTP*:6,GST_WEBRTC*:6" python3 gst-webrtc.py
[FUNC] - signaling_loop
publisher_id: 7889106451664231
Connected to Janus at ws://localhost:8188/janus
Session created with ID: 1027099897837727
Plugin attached with handle ID: 5817319633083828
{'janus': 'ack', 'session_id': 1027099897837727, 'transaction': 'f1782a81-16d6-4295-ad0a-e19fc9cbcb88'}
Joined as subscriber to publisher: 7889106451664231
[FUNC] - create_pipeline
[FUNC] - setup_webrtcbin_pads
Pipeline state: null
Pipeline is not in PLAYING state. Resetting...
[FUNC] - on_negotiation_needed
0:00:00.032232235 27125 0x270f2a0 WARN webrtcbin gstwebrtcbin.c:3655:sdp_media_from_transceiver:<webrtcbin> Caps application/x-rtp, media=(string)video, encoding-name=(string)VP8, payload=(int)96, clock-rate=(int)90000, rtcp-fb-nack-pli=(boolean)true, rtcp-fb-ccm-fir=(boolean)true, rtcp-fb-transport-cc=(boolean)true are missing ssrc
[FUNC] - handle_sdp
0:00:00.155120431 27125 0x76f1240010e0 FIXME default gstutils.c:4089:gst_element_decorate_stream_id_internal:<nicesrc0> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.155155723 27125 0x76f1240010e0 WARN GST_PADS gstpad.c:4412:gst_pad_peer_query:<nicesrc0:src> could not send sticky events
0:00:00.155304053 27125 0x270f2a0 WARN webrtcbin gstwebrtcbin.c:3655:sdp_media_from_transceiver:<webrtcbin> Caps application/x-rtp, media=(string)audio, encoding-name=(string)OPUS, payload=(int)111, clock-rate=(int)48000, rtcp-fb-transport-cc=(boolean)true are missing ssrc
[FUNC] - on_offer_created
(python3:27125): GStreamer-WARNING **: 09:48:16.868: Promise result isn't PENDING or INTERRUPTED
WebRTCBin signaling state: <enum GST_WEBRTC_SIGNALING_STATE_STABLE of type GstWebRTC.WebRTCSignalingState>
Invalid signaling state for setting SDP: <enum GST_WEBRTC_SIGNALING_STATE_STABLE of type GstWebRTC.WebRTCSignalingState>
reply:
0:00:00.155710628 27125 0x270f2a0 WARN structure gststructure.c:3097:priv_gst_structure_append_to_gstring: No value transform to serialize field 'offer' of type 'GstWebRTCSessionDescription'
application/x-gst-promise, offer=(GstWebRTCSessionDescription)NULL;
Pipeline state: paused
Generated SDP (offer):
v=0
o=- 6680316589392387995 0 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-options:trickle
a=group:BUNDLE video0 audio1
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=setup:actpass
a=ice-ufrag:IUmL151BmxKXsFyG/rcO3YgJKpX2evpK
a=ice-pwd:jIe3icfuK3rl8r0uOifhTZSgsuPc0t4s
a=rtcp-mux
a=rtcp-rsize
a=recvonly
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 transport-cc
a=mid:video0
a=fingerprint:sha-256 C0:B6:D8:7C:89:E0:3F:0C:8B:BE:C6:FF:FA:32:55:BA:2F:A3:B2:FF:10:DB:19:FC:E3:3A:D0:EB:FD:85:83:2F
a=rtcp-mux-only
m=audio 0 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=setup:actpass
a=ice-ufrag:IUmL151BmxKXsFyG/rcO3YgJKpX2evpK
a=ice-pwd:jIe3icfuK3rl8r0uOifhTZSgsuPc0t4s
a=bundle-only
a=rtcp-mux
a=rtcp-rsize
a=recvonly
a=rtpmap:111 OPUS/48000
a=rtcp-fb:111 transport-cc
a=mid:audio1
a=fingerprint:sha-256 C0:B6:D8:7C:89:E0:3F:0C:8B:BE:C6:FF:FA:32:55:BA:2F:A3:B2:FF:10:DB:19:FC:E3:3A:D0:EB:FD:85:83:2F
a=rtcp-mux-only
SDP acknowledged by Janus. Flushing ICE candidate buffer...
[FUNC] - on_ice_candidate: mline_index=0, candidate=candidate:1 1 UDP 2015363327 172.31.26.104 38447 typ host
[FUNC] - on_ice_candidate: mline_index=0, candidate=candidate:2 1 TCP 1015021823 172.31.26.104 9 typ host tcptype active
[FUNC] - on_ice_candidate: mline_index=0, candidate=candidate:3 1 TCP 1010827519 172.31.26.104 43373 typ host tcptype passive
[FUNC] - on_ice_candidate: mline_index=0, candidate=candidate:4 1 UDP 2015363583 fe80::e8:23ff:fe38:4163 48964 typ host
[FUNC] - on_ice_candidate: mline_index=0, candidate=candidate:5 1 TCP 1015022079 fe80::e8:23ff:fe38:4163 9 typ host tcptype active
[FUNC] - on_ice_candidate: mline_index=0, candidate=candidate:6 1 TCP 1010827775 fe80::e8:23ff:fe38:4163 34149 typ host tcptype passive
[FUNC] - on_ice_candidate: mline_index=0, candidate=candidate:7 1 UDP 1679819007 3.72.9.103 38447 typ srflx raddr 172.31.26.104 rport 38447
[FUNC] - on_ice_candidate: mline_index=0, candidate=candidate:8 1 TCP 847249663 3.72.9.103 9 typ srflx raddr 172.31.26.104 rport 9 tcptype active
[FUNC] - on_ice_candidate: mline_index=0, candidate=candidate:9 1 TCP 843055359 3.72.9.103 43373 typ srflx raddr 172.31.26.104 rport 43373 tcptype passive
[FUNC] - on_ice_candidate: mline_index=0, candidate=
lorenzo
(Lorenzo Miniero)
November 29, 2024, 10:10am
3
The simple WHEP client doesn’t connect to the VideoRoom, it uses the Streaming plugin. So to do a full circle WHIP/WHEP demo you have to use WHIP to publish to the VideoRoom, configure it to RTP-foward to the Streaming plugin, and then use WHEP to pull from the Streaming plugin.
At any rate, if you use the default Streaming plugin mountpoint and you feed it, you should be able to consume it with the simple WHEP client.
On the “missing ssrc”, you may need to specify them in the command line, as I do in the examples written in the README, but I’m not a gstreamer expert, so asking someone who is may be a good idea.
ckuhr
November 29, 2024, 10:18am
4
lorenzo:
The simple WHEP client doesn’t connect to the VideoRoom, it uses the Streaming plugin. So to do a full circle WHIP/WHEP demo you have to use WHIP to publish to the VideoRoom, configure it to RTP-foward to the Streaming plugin, and then use WHEP to pull from the Streaming plugin.
Yes, I did that. Ultimately leading to the “missing ssrc” problem, when I specify gstreamer caps. It does not occur when I use rtpbin ! filesink dump=true
lorenzo:
On the “missing ssrc”, you may need to specify them in the command line, as I do in the examples written in the README, but I’m not a gstreamer expert, so asking someone who is may be a good idea.
In which README, I didn’t see that?
Thanks
lorenzo
(Lorenzo Miniero)
November 29, 2024, 10:24am
5
The readmes of both the WHIP and WHEP simple client repos. Anyway, I checked and I’m setting an SSRC only for WHIP, not for WHEP.