Hello,
I followed the official documentation to stream from Gstreamer into Media soup and here is my code:
async function rtpIn() {
plainTransport2 = await mediasoupRouter.createPlainTransport(
{
listenIp : ‘127.0.0.1’,
rtcpMux: false,
});
await plainTransport2.connect({ ip: ‘127.0.0.1’, port: 5560 , rtcpPort: 5561 })
rtpParameters3 = { codecs: [{ mimeType:‘video/vp8’, payloadType:101, clockRate:90000 }], encodings: [{ ssrc:2222 }] }
producer3 = await plainTransport2.produce({ kind:‘video’, rtpParameters:rtpParameters3 });
setInterval(() =>
{
producer3.getStats()
.then(stats => {
console.log(“producer3 stats”);
console.warn(stats);
}
);
}, 2000);
Get:
gst-launch-1.0 rtpbin name=rtpbin videotestsrc ! videoconvert ! vp8enc target-bitrate=1000000 deadline=1 cpu-used=4 ! rtpvp8pay pt=101 ssrc=2222 picture-id-mode=2 ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 ! udpsink host=127.0.0.1 port=5560 rtpbin.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=5561 sync=false async=false
For some reason I keep getting an empty array even after starting the Gstreamer command, any idea if I am doing something wrong from mediasoup side?
Thanks