Unable to Consume RTP packets forwarded by mediasoup


I am testing mediasoup with this example LINK, I was able to deploy this on a VM, and the demo was able to RTP forward the packets to the ports defined.

I am pasting my config.js as a Pastebin link LINK_TO_CONFIG.

  1. Commented most of the media codecs since I required only video as H264 stream.
  2. I was able to check which port the stream is forwarded to the server.
  3. I used sudo ngrep -d any port PORT_NUM to cross verify if I was able to get the RTP packets to the udp port.

I.E server is a VM

My issue is,

  1. I am unable to consume the RTP packets coming from mediasoup-demo page to the server.
  2. The tool I am using to consume the RTP packets is GStreamer, I am pasting the command below
    gst-launch-1.0 -e udpsrc port=rtp_port ! application/x-rtp, clock-rate=90000 ! rtph264depay ! video/x-
    h264 ! queue ! h264parse ! queue ! mp4mux ! filesink location=test.mp4.
  3. The error I get when trying to consume the RTP packets is,
    gstudpsrc.c(1563): gst_udpsrc_open (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
    bind failed: Error binding to address: Address already in use
  4. I assume that mediasoup-demo is binding to the port or IP address on the server to forward the RTP packets.
  5. So basically I am unable to consume the RTP packets coming from the mediasoup-demo page with gstreamer.

Help required!