Hi, I’m using gstreamer to do a streaming test, receiver side is webpage/WebRTCTransport, the pipeline cmd is:
const callRTPStreamPushCmd = `GST_DEBUG="*:4" gst-launch-1.0 \
rtpbin name=rtpbin \
videotestsrc \
! queue \
! videoconvert \
! vp8enc \
! rtpvp8pay pt=101 ssrc=22222222 picture-id-mode=2 \
! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! udpsink host=${videoTransportIp} port=${videoTransportPort} \
rtpbin.send_rtcp_src_0 ! udpsink host=${videoTransportIp} port=${videoTransportRtcpPort} sync=false async=false`
This works on Mac (while mediasoup log says keyframe interval is 4s), & mediasoup log here:
on client Tu5vvKX1Y9ERHTnZAAAD connectTransport
2021-10-17T11:54:14.492Z mediasoup:WebRtcTransport connect()
2021-10-17T11:54:14.492Z mediasoup:Channel request() [method:transport.connect, id:7]
2021-10-17T11:54:14.492Z mediasoup:Channel request succeeded [method:transport.connect, id:7]
2021-10-17T11:54:14.498Z mediasoup:Channel [pid:52177] RTC::IceServer::HandleTuple() | transition from state 'new' to 'connected'
2021-10-17T11:54:14.499Z mediasoup:Channel [pid:52177] RTC::WebRtcTransport::OnIceServerSelectedTuple() | ICE selected tuple
2021-10-17T11:54:14.499Z mediasoup:Channel [pid:52177] RTC::WebRtcTransport::OnIceServerConnected() | ICE connected
2021-10-17T11:54:14.499Z mediasoup:Channel [pid:52177] RTC::WebRtcTransport::MayRunDtlsTransport() | running DTLS transport in local role 'server'
2021-10-17T11:54:14.499Z mediasoup:Channel [pid:52177] RTC::WebRtcTransport::OnDtlsTransportConnecting() | DTLS connecting
2021-10-17T11:54:14.499Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::Run() | running [role:server]
2021-10-17T11:54:14.499Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | DTLS handshake start
2021-10-17T11:54:14.499Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'before SSL initialization']
2021-10-17T11:54:14.499Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | role: server, waiting:'before SSL initialization']
2021-10-17T11:54:14.500Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'before SSL initialization']
2021-10-17T11:54:14.500Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS read client hello']
2021-10-17T11:54:14.500Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS write server hello']
2021-10-17T11:54:14.500Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS write certificate']
2021-10-17T11:54:14.500Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS write key exchange']
2021-10-17T11:54:14.500Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS write certificate request']
2021-10-17T11:54:14.500Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS write server done']
2021-10-17T11:54:14.500Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | role: server, waiting:'SSLv3/TLS write server done']
2021-10-17T11:54:14.501Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS write server done']
2021-10-17T11:54:14.501Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS read client certificate']
2021-10-17T11:54:14.501Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS read client key exchange']
2021-10-17T11:54:14.502Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS read certificate verify']
2021-10-17T11:54:14.502Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS read change cipher spec']
2021-10-17T11:54:14.502Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS read finished']
2021-10-17T11:54:14.502Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS write change cipher spec']
2021-10-17T11:54:14.502Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | [role:server, action:'SSLv3/TLS write finished']
2021-10-17T11:54:14.502Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::OnSslInfo() | DTLS handshake done
2021-10-17T11:54:14.502Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::CheckRemoteFingerprint() | valid remote fingerprint
2021-10-17T11:54:14.502Z mediasoup:Channel [pid:52177] RTC::DtlsTransport::GetNegotiatedSrtpCryptoSuite() | chosen SRTP crypto suite: SRTP_AEAD_AES_256_GCM
2021-10-17T11:54:14.502Z mediasoup:Channel [pid:52177] RTC::WebRtcTransport::OnDtlsTransportConnected() | DTLS connected
on client Tu5vvKX1Y9ERHTnZAAAD resume
2021-10-17T11:54:14.507Z mediasoup:Consumer resume()
2021-10-17T11:54:14.507Z mediasoup:Channel request() [method:consumer.resume, id:8]
2021-10-17T11:54:14.508Z mediasoup:Channel request succeeded [method:consumer.resume, id:8]
2021-10-17T11:54:14.508Z mediasoup:Channel [pid:52177] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:1, media ssrc:852093862]
2021-10-17T11:54:14.547Z mediasoup:Channel [pid:52177] RTC::IceServer::HandleTuple() | transition from state 'connected' to 'completed'
2021-10-17T11:54:14.547Z mediasoup:Channel [pid:52177] RTC::WebRtcTransport::OnIceServerCompleted() | ICE completed
2021-10-17T11:54:16.951Z mediasoup:Channel [pid:52177] RTC::Producer::ReceiveRtpPacket() | key frame received [ssrc:22222222, seq:6564]
2021-10-17T11:54:16.951Z mediasoup:Channel [pid:52177] RTC::SimpleConsumer::SendRtpPacket() | sync key frame received
2021-10-17T11:54:16.951Z mediasoup:Channel [pid:52177] RTC::SimpleConsumer::SendRtpPacket() | sending sync packet [ssrc:852093862, seq:1, ts:4198747132] from original [seq:6564]
2021-10-17T11:54:21.215Z mediasoup:Channel [pid:52177] RTC::Producer::ReceiveRtpPacket() | key frame received [ssrc:22222222, seq:6705]
2021-10-17T11:54:25.481Z mediasoup:Channel [pid:52177] RTC::Producer::ReceiveRtpPacket() | key frame received [ssrc:22222222, seq:6846]
2021-10-17T11:54:29.750Z mediasoup:Channel [pid:52177] RTC::Producer::ReceiveRtpPacket() | key frame received [ssrc:22222222, seq:6987]
However, when i run mediasoup server inside docker, something wrong happened:
The log line
RTC::IceServer::HandleTuple() | transition from state 'new' to 'connected'
would never hit, and chrome browser page consumer logs:
mediasoup-client:Transport consume() | Consumer for RTP probation created +6ms
mediasoup-client:Transport connection state changed to disconnected +15s
To me, it looks like webrtc client cannot setup ICE-lite connection with the server in docker, which makes me puzzled
Please help! Anyone could give some hints?