Can't get video to show up and not seeing any errors

Hello,

I’ve been trying to build an application using mediasoup-demo as an example. I’ve only took the parts that were necessary for me. I have a much simplified use case:

  1. Producers are only ffmpeg or gstreamer broadcasters (video only)
  2. Multiple webrtc browser consumers can join the room and see the video.
    I implemented everything and ran it locally. All the messaging seems to go well. ffmpeg script is running successfully. A track is added in the browser but no video shows up. Nor are there any errors anywhere.

I’ve enabled debug logging and everything seems to be succeeding.

For example when I run ffmpeg.sh, the server has these logs:

mediasoup:Router createPlainTransport() +11s
  mediasoup:Channel request() [method:router.createPlainTransport, id:6] +11s
  mediasoup:Channel request succeeded [method:router.createPlainTransport, id:6] +1ms
  mediasoup:Transport constructor() +11s
  mediasoup:PlainTransport constructor() +0ms
  mediasoup:Transport produce() +584ms
  mediasoup:Channel request() [method:transport.produce, id:7] +588ms
  mediasoup:Channel request succeeded [method:transport.produce, id:7] +2ms
  mediasoup:Producer constructor() +0ms
  mediasoup:Transport consume() +7ms
  mediasoup:Channel request() [method:transport.consume, id:8] +4ms
  mediasoup:Channel request succeeded [method:transport.consume, id:8] +1ms
  mediasoup:Consumer constructor() +0ms
mediasoup:WebRtcTransport connect() +11s
  mediasoup:Channel request() [method:transport.connect, id:9] +39ms
  mediasoup:Channel request succeeded [method:transport.connect, id:9] +7ms
mediasoup:Consumer resume() +82ms
  mediasoup:Channel request() [method:consumer.resume, id:10] +37ms
  mediasoup:Channel request succeeded [method:consumer.resume, id:10] +1ms

And the client has these logs:

mediasoup-client:Transport consume() +11s
mediasoup-client:Chrome111 receive() [trackId:f6fe8ac2-811b-4a2e-95c9-d3ee6564a2bf, kind:video] +11s
mediasoup-client:Chrome111 receive() | calling pc.setRemoteDescription() [offer:{type: 'offer', sdp: 'v=0\r\no=mediasoup-client 10000 1 IN IP4 0.0.0.0\r\ns=…D 277833509 277833510\r\na=rtcp-mux\r\na=rtcp-rsize\r\n'}] +2ms
mediasoup-client:RemoteSdp updateDtlsRole() [role:server] +0ms
mediasoup-client:Chrome111 receive() | calling pc.setLocalDescription() [answer:{type: 'answer', sdp: 'v=0\r\no=- 5907465256624370235 2 IN IP4 127.0.0.1\r\ns…a=ice-options:trickle\r\na=rtcp-mux\r\na=rtcp-rsize\r\n'}] +42ms
mediasoup-client:Consumer constructor() +0ms
mediasoup-client:Chrome111 receive() [trackId:probator, kind:video] +6ms
mediasoup-client:Chrome111 receive() | calling pc.setRemoteDescription() [offer:{type: 'offer', sdp: 'v=0\r\no=mediasoup-client 10000 2 IN IP4 0.0.0.0\r\ns=…c:1234 cname:probator\r\na=rtcp-mux\r\na=rtcp-rsize\r\n'}] +1ms
mediasoup-client:Chrome111 receive() | calling pc.setLocalDescription() [answer:{type: 'answer', sdp: 'v=0\r\no=- 5907465256624370235 3 IN IP4 127.0.0.1\r\ns…a=ice-options:trickle\r\na=rtcp-mux\r\na=rtcp-rsize\r\n'}] +15ms
mediasoup-client:Transport createPendingConsumers() | Consumer for RTP probation created +71ms

Any ideas on where to start debugging it?
I’ve followed the post here that looked similar:

However I dont think it’s an autoplay issue. I enabled controls and tried to manually play, also set it to muted. Furthermore the my incoming data graphs are empty (zero bytes coming in) and I don’t have the same kind. Only ones called: “Stats graphs for inbound-rtp”

Would appreciate some help! Thanks!

EDIT: got another detail, if you look at the media tab of chrome debugger, I can see the media appear but it seems to be paused (if I compare it to a working demo, the working one has one additional event ‘kplay’), I confirmed that I call the consumer.resume() on server side and client side

EDIT2: ok it seems that ice conneciton was not made. I’ve tried multiple things but the best I can do is that it tries to connect and gets to the ‘failed’ state

ICE connection state: new => checking => disconnected
Connection state: new => connecting => failed
Signaling state: new => have-remote-offer => stable => have-remote-offer => stable
ICE Candidate pair: (not connected)

EDIT3: ok, so it seems I needed to change 127.0.0.1 to my local ip
it sometimes helps to post the question and continue working on it haha.

I’ll keep the post for future reference xD