WebRtc Blank or Black RenderView in Android

Latest theres some problems suddenly break out in the video call sence…May this be the Janus Server problem?

Here is the scene.

Client A make a video call to ClientB. At the start parse, Both ClientA and ClientB render the video data from the font-camera capturer, and make a peerconnection to JanusServer. and then just fine.

Then the Client B received the video calling request and join the video, then try to build the peerconnection to Janus Server, and also build the peerconnection to the ClientA.

But Client B work fine, and is correctly render the local video data from font-camera, and also the remote video data from ClientA.

But sometimes, Client A render fail while the remote data have received… then I capture the log, EglRenderer report that the frame drop like below. But i can still hear the voice from ClientB

2022-05-24 16:12:07.118 20211-20285/? I/-org.webrtc.Logging-: 0-EglRenderer: videoRenderDuration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
2022-05-24 16:12:07.352 20211-20329/? I/-org.webrtc.Logging-: 0-EglRenderer: videoRenderDuration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
2022-05-24 16:12:07.353 20211-20329/? I/-org.webrtc.Logging-: 0-EglRenderer: videoRenderDuration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
2022-05-24 16:12:09.972 20211-20327/? I/-org.webrtc.Logging-: 0-EglRenderer: videoRenderDuration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
2022-05-24 16:12:10.999 20211-20324/? I/-org.webrtc.Logging-: 0-EglRenderer: videoRenderDuration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
2022-05-24 16:12:11.123 20211-20322/? I/-org.webrtc.Logging-: 0-EglRenderer: videoRenderDuration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
2022-05-24 16:12:11.124 20211-20322/? I/-org.webrtc.Logging-: 0-EglRenderer: videoRenderDuration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
2022-05-24 16:12:11.362 20211-20290/? I/-org.webrtc.Logging-: 0-EglRenderer: videoRenderDuration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. 

And then i realized that is probably there’s some problems happen in the network data transmission…then i get the RTCStatsType from differnt(ClientA to janus and ClientA to ClientB) peerconnection. and i found a weird log in ClientA.

As I known as PeerConnection, its suppose to be theres only one inboundVideoStream and inboundAudioStream, and only one outboundVideoStream and outboundVideoStream beside the multiStream sence(But in this situation, I aint use multistream)..And the second inboundVideoStream byteReceived is alway zero..

Its theres any possible that the EglRender get the second video stream as sink and pass it to native?? But it doesn’t make sense, cause peerConnection also have two different inboundAudioStream, but work fine.

Also i have check the ClientB log, Its seem normal, one peerconnection just have one inboundVideoStream and one inboudAudioStream.

So why? Why one peerConnection have two different InboundVideoStream? May this can be the problem to lead to this issue?

-----inbound.


2022-05-24 16:36:42.911 20211-20326/? D/-ConnectionStatusHelper-: 0-
     userName:69b8cd9238004cf9bb33d36c4f2f 
    OriginData:ConnectionStatus(key='RTCInboundRTPAudioStream_3474935701', id='RTCInboundRTPAudioStream_3474935701', type="inbound-rtp", timeStamp=1653381402904495, info=AudioInboundConnectionStatus(packetsReceived=4897, bytesReceived=320554, packetsLost=0, lastPacketReceivedTimestamp=242214.814, jitter=0.002, fractionLost=0.0, packetsReceivedDiff=0, bytesReceivedDiff=0, packetsLostDiff=0), BaseConnectionStatus(ssrc=3474935701, isRemote=false, mediaType="audio", kind='audio', transportId='RTCTransport_audio_1', trackId='', codecId='RTCCodec_audio_Inbound_111', updateTime=1653381402910), isValid=true)
2022-05-24 16:36:42.912 20211-20291/? D/-ConnectionStatusHelper-: 0-
     userName:69b8cd9238004cf9bb33d36c4f2f 
    OriginData:ConnectionStatus(key='RTCInboundRTPAudioStream_4186376904', id='RTCInboundRTPAudioStream_4186376904', type="inbound-rtp", timeStamp=1653381402904495, info=AudioInboundConnectionStatus(packetsReceived=0, bytesReceived=0, packetsLost=0, lastPacketReceivedTimestamp=0.0, jitter=0.0, fractionLost=0.0, packetsReceivedDiff=0, bytesReceivedDiff=0, packetsLostDiff=0), BaseConnectionStatus(ssrc=4186376904, isRemote=false, mediaType="audio", kind='audio', transportId='RTCTransport_audio_1', trackId='RTCMediaStreamTrack_receiver_17', codecId='', updateTime=1653381402910), isValid=true)


2022-05-24 16:36:42.913 20211-20322/? D/-ConnectionStatusHelper-: 0-
     userName:69b8cd9238004cf9bb33d36c4f2f 
    OriginData:ConnectionStatus(key='RTCInboundRTPVideoStream_1827282291', id='RTCInboundRTPVideoStream_1827282291', type="inbound-rtp", timeStamp=1653381402904495, info=VideoInboundConnectionStatus(firCount=0, pliCount=3, nackCount=24, sliCount=0, packetsReceived=19182, bytesReceived=21350593, jitter=0.0, packetsLost=4, fractionLost=0.0, framesDecoded=2763, packetsReceivedDiff=0, bytesReceivedDiff=0, packetsLostDiff=0), BaseConnectionStatus(ssrc=1827282291, isRemote=false, mediaType="video", kind='video', transportId='RTCTransport_audio_1', trackId='', codecId='RTCCodec_video_Inbound_96', updateTime=1653381402910), isValid=true)
2022-05-24 16:36:42.915 20211-20326/? D/-ConnectionStatusHelper-: 0-
     userName:69b8cd9238004cf9bb33d36c4f2f 
    OriginData:ConnectionStatus(key='RTCInboundRTPVideoStream_391733382', id='RTCInboundRTPVideoStream_391733382', type="inbound-rtp", timeStamp=1653381402904495, info=VideoInboundConnectionStatus(firCount=0, pliCount=0, nackCount=0, sliCount=0, packetsReceived=0, bytesReceived=0, jitter=0.0, packetsLost=0, fractionLost=0.0, framesDecoded=0, packetsReceivedDiff=0, bytesReceivedDiff=0, packetsLostDiff=0), BaseConnectionStatus(ssrc=391733382, isRemote=false, mediaType="video", kind='video', transportId='RTCTransport_audio_1', trackId='RTCMediaStreamTrack_receiver_18', codecId='', updateTime=1653381402910), isValid=true)

-----outbound

2022-05-24 16:36:42.915 20211-20283/? D/-ConnectionStatusHelper-: 0-
     userName:69b8cd9238004cf9bb33d36c4f2f 
    OriginData:ConnectionStatus(key='RTCOutboundRTPAudioStream_3823193211', id='RTCOutboundRTPAudioStream_3823193211', type="outbound-rtp", timeStamp=1653381402904495, info=AudioOutboundConnectionStatus(packetsSent=0, retransmittedPacketsSent=0, bytesSent=0, retransmittedBytesSent=0, packetsSentDiff=0, bytesSentDiffer=0), BaseConnectionStatus(ssrc=3823193211, isRemote=false, mediaType="audio", kind='audio', transportId='RTCTransport_audio_1', trackId='RTCMediaStreamTrack_sender_35', codecId='RTCCodec_audio_Outbound_111', updateTime=1653381402910), isValid=true)
2022-05-24 16:36:42.916 20211-20326/? D/-ConnectionStatusHelper-: 0-
     userName:69b8cd9238004cf9bb33d36c4f2f 
    OriginData:ConnectionStatus(key='RTCOutboundRTPVideoStream_584071059', id='RTCOutboundRTPVideoStream_584071059', type="outbound-rtp", timeStamp=1653381402904495, info=VideoOutboundConnectionStatus(firCount=0, pliCount=0, nackCount=0, sliCount=0, qpSum=0, packetsSent=0, retransmittedPacketsSent=0, bytesSent=0, retransmittedBytesSent=0, framesEncoded=0, totalEncodeTime=0.0, packetsSentDiff=0, bytesSentDiffer=0), BaseConnectionStatus(ssrc=584071059, isRemote=false, mediaType="video", kind='video', transportId='RTCTransport_audio_1', trackId='RTCMediaStreamTrack_sender_36', codecId='RTCCodec_video_Outbound_96', updateTime=1653381402910), isValid=true)

Leave a Comment