Hi @haiyangwu,
I’ve been trying to adapt your demo to a test project that I am doing. The setup is the following:
1 ffmpeg video producer
1 mediasoup server
1 mediasoup-client consumer (web)
1 mediasoup-client-android based app following the demo that you’ve provided here
The first three elements seem to work together. I can see the video in the browser. Unfortunately I cannot get the mediasoup-client-android to work with this setup.
The connection seems to be established correctly between the mediasoup server and the mediasoup-client-android, but then I receive a lot of messages like this and I don’t see any video:
[…]
mediasoup:worker[pid:19367] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:333259308, media ssrc:333259308] +50ms
mediasoup:worker[pid:19367] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:333259308, media ssrc:333259308] +50ms
mediasoup:worker[pid:19367] RTC::Producer::ReceiveRtpPacket() | key frame received [ssrc:55059, seq:18436] +29ms
mediasoup:worker[pid:19367] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:333259308, media ssrc:333259308] +20ms
mediasoup:worker[pid:19367] RTC::Transport::HandleRtcpPacket() | PLI received, requesting key frame for Consumer [sender ssrc:333259308, media ssrc:333259308] +50ms
[…]
One thing that is different in my app is that I didn’t use the @BindingAdapter(“edias_render”) for the method
public static void render(SurfaceViewRenderer renderer, VideoTrack track) {
Log.d(TAG, "edias_render: " + (track != null));
if (track != null) {
track.addSink(renderer);
renderer.setVisibility(View.VISIBLE);
} else {
renderer.setVisibility(View.GONE);
}
}
Basically it seems that the client never receives any key frame so it keeps on sending PLIs to the server. The producer does not support PLIs but it still sends keyframes at regular intervals.
Please let me know if you have any ideas how I could debug this.