# Key frame not receiv by client

**URL:** <https://mediasoup.discourse.group/t/key-frame-not-receiv-by-client/5933>\
**Category:** mediasoup libraries\
**Created:** [March 20, 2024, 4:13pm UTC](https://mediasoup.discourse.group/t/key-frame-not-receiv-by-client/5933 "2024-03-20T16:13:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![EtPs](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@EtPs](https://mediasoup.discourse.group/u/EtPs)\
**Post date:** [March 20, 2024, 4:13pm UTC](https://mediasoup.discourse.group/t/key-frame-not-receiv-by-client/5933/1 "2024-03-20T16:13:57Z")

</div>

Hi, I’m trying to create an application that transcodes a video with ffmpeg and sends it to mediasoup, accessible with WebRTC on Chrome.

 ![image](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/0/0f97df5d9e3fdbdd616948c738043d094cd6616d.png)

Issue:  
Everything works fine when one client is connected, but when a second client connects (red part of the diagram), the video freezes for the first client and the second one is okay. Inspecting traces, I see there is a problem with keyframes; the first client doesn’t receive keyframes anymore, but in the consumer on the server, there are trace events that send keyframes.  
Any ideas ?

---

<div class="post-metadata">

**Author:** ![EtPs](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@EtPs](https://mediasoup.discourse.group/u/EtPs)\
**Post date:** [March 22, 2024, 4:12pm UTC](https://mediasoup.discourse.group/t/key-frame-not-receiv-by-client/5933/2 "2024-03-22T16:12:46Z")

</div>

So, it still doesn’t work. I believe the problem is due to lost packets:

 ![image](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/9/90087b792cd1c5c99b79e7d2b0183658f50025cf.png)

I’ve tried increasing the configuration in `sysctl.conf` and also increasing the `sendBufferSize` in both `PlainTransport` and `WebRTCTransport` , but I still can’t create two consumers on the same producer.

---

<div class="post-metadata">

**Author:** ![EtPs](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@EtPs](https://mediasoup.discourse.group/u/EtPs)\
**Post date:** [March 25, 2024, 4:28pm UTC](https://mediasoup.discourse.group/t/key-frame-not-receiv-by-client/5933/3 "2024-03-25T16:28:18Z")

</div>

I take a screenshot of chrome://webrtc-internals/ and I notice significant changes in the graphs.  
At 17:12, I introduce a second client and observe that I am unable to decode frames anymore. There are numerous packet losses and a considerable amount of retransmitted packets being received.

 ![Capture1](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/f/f1ce2326d1eebfc921146af5db1fb517296cddbc.png)  
 ![Capture4](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/7/794e13ad2177cf1bfc8a7db2f9403858d056af7a.png)  
 ![Capture3](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/f/fbffa5ef9a733bd719979cd9f787cdd356ae0b6f.png)  
 ![Capture2](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/6/696074a89b69490c8828a0eb56be481d0beadd5d.png)

---

<div class="post-metadata">

**Author:** ![EtPs](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@EtPs](https://mediasoup.discourse.group/u/EtPs)\
**Post date:** [March 26, 2024, 9:30am UTC](https://mediasoup.discourse.group/t/key-frame-not-receiv-by-client/5933/4 "2024-03-26T09:30:10Z")

</div>

I have the impression that the consumer stops sending RTP packets, so the client sends NACK requests, causing the server to respond with retransmitted packets, but I’m not quite sure why this behavior occurs.

---

<div class="post-metadata">

**Author:** ![EtPs](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@EtPs](https://mediasoup.discourse.group/u/EtPs)\
**Post date:** [April 18, 2024, 2:41pm UTC](https://mediasoup.discourse.group/t/key-frame-not-receiv-by-client/5933/5 "2024-04-18T14:41:24Z")

</div>

After further investigation, the server is still sending all the RTP packets, but I don’t know why on client-side packets are being received (I see them in Wireshark), yet the client doesn’t see or recognize them (I’m not sure).

---

<div class="post-metadata">

**Author:** ![EtPs](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@EtPs](https://mediasoup.discourse.group/u/EtPs)\
**Post date:** [May 30, 2024, 8:50am UTC](https://mediasoup.discourse.group/t/key-frame-not-receiv-by-client/5933/6 "2024-05-30T08:50:52Z")

</div>

I resolve this error by disabling liburing.

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 30, 2024, 9:17am UTC](https://mediasoup.discourse.group/t/key-frame-not-receiv-by-client/5933/7 "2024-05-30T09:17:56Z")

</div>

What? Disabling liburing should not fix anything. If you identify a bug that hopefully can be properly reported and reproduced and if that bug goes away by disabling liburing, please report a bug in mediasoup GitHub.
