Consumer video track muted on production, not muted in local

Hi everyone,

I have made changes to the mediasoup server made by another programmer years ago. In local, when producing/consuming video, the video stream works perfectly fine, meaning:

  • the video stream is not muted.
  • producerScore and score for consumer are both 10.

When deploying client and server to test servers, both producers and consumers are created without error, however:

  • I don’t see any video, the video element has a eternal spinning wheel.
  • The video stream is active but muted (muted: true).
  • producerScore is 0 but consumer score is 10.

I played with listenIps when creating WebRTC transport with those two values:

  • { ip: ‘0.0.0.0’, announcedIp: 127.0.0.1 }
  • { ip: ‘0.0.0.0’, announcedIp: [public IP of server] }

None was fixing the bug.

Does anyone has an idea?

Thanks!

Make sure you have enabled the TCP/UDP ports which you provided to mediasoup’s createWorker method. Even if you have provided the right public ip of the server if your ports are not open then there will be no flow of data and hence paused tracks.

Thanks!

Exactly, it was a firewall problem. The rtc min to max ports declared in the worker (rtcMinPort and rtcMaxPort parameters) were not exposed in my server. I made a firewall rule to allow them (ex.: 40000:41999) and it worked.

1 Like

Great :+1:

I want to ask that as you stated to enable TCP/UDP ports. Can you please elabotate on this.

You need to provide range of ports on which mediasoup will work while creating mediasoup worker, and you must open these tcp/udp ports for public on server so that traffic can move through them, otherwise it will not work. In the new versions of mediasoup you can provide single port instead of port range and in that case you will still have to open that single port for public to make it work.

Screenshot from 2023-06-14 12-48-10
I have attached the screenshot can you help me with this
The receiver video is not showing up

If you are testing on local machine then set ip to 127.0.0.1 and keep the announcedIp empty. If you are on server then you need to set announcedIp to the public ip of the server.

This post describes the ip, annoucedIp best:

You should open a new topic for your issue as this topic is already resolved.

1 Like