Hi there,
I have experienced a strange problem with GStreamer when I receive plain RTP-Streams from Mediasoup. I hope someone has a clue about that issue.
When I connect to the RTP transports the audio is immediately there but the video always needs 3min 22s until the stream is available at the sink. The behaviour is the same for filesinks and autovideosinks. Any ideas why it takes always over 3 mins for the videostream to be processed? After that everything is fine and there is zero latency. Just the late start is giving me a headache.
I tried rtpbin and sdpdemux and it’s the same. Here is an example command (skip the nodejs):
dataurisrc uri="data:application/sdp;base64,${sdpBase64}" ! sdpdemux timeout=0 name=demux webmmux name=mux ! filesink location="D:\\gstreamer_webrtc_test.webm" demux. ! queue ! rtpopusdepay ! opusparse ! mux. demux. ! queue ! rtpvp8depay ! mux.
That’s my SDP from mediasoup:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=TEST
c=IN IP4 127.0.0.1
t=0 0
m=video 40612 RTP/AVP 101
a=rtpmap:101 VP8/90000
a=sendonly
m=audio 40622 RTP/AVP 100
a=rtpmap:100 opus/48000/2
a=sendonly
Here is a snippet from the code that initiates the video transport in mediasoup:
async start() {
this.videoTransport = await this.router.createPlainTransport({
listenIp: { ip: “0.0.0.0”, announcedIp: “127.0.0.1” },
rtcpMux: true,
comedia: false,
});await this.videoTransport.connect({ ip: "127.0.0.1", port: this.getPorts().videoProducer, rtcpPort: undefined, }); this.videoConsumer = await this.videoTransport.consume({ producerId: this.videoProducer.id, rtpCapabilities: { codecs: [ this.router.rtpCapabilities.codecs.find( (codec) => codec.kind === "video" ), ], rtcpFeedback: [], }, paused: true, });
…
It’s working with ffmpeg but with gstreamer I get that strange delay of over 3 minutes. Have you seen this before?
Thanks for your help!
Best Regards,
Richard