-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consumer NACK with the specified sequence number packet but the retransmission fails #906
Comments
Thanks for the detailed observations. Next week some of us won't be fully online, but we'll check at this as soon as possible. |
thank you~ |
@jmillan @mengbieting And there is another situaltion: mediasoup/worker/src/RTC/NackGenerator.cpp Lines 65 to 86 in bba2aa0
So maybe we should always return true here. |
thanks for reply~ |
There are two situaltions:
Return true is a temporary way to fix the problem, but i'm not sure whether there is any side-effect. |
The first situaltion is not recoverable, because we have inserted the seq num to |
thanks, yes, the second situaltion is recoverable, even if the nack has not been sent yet, we will send the nack later. After receiving the rtx packet again, it will be recovered and forwarded to the consumer, consumer will not need to nack this packet all the time. |
why mediasoup received rtx who's origin seq number greater than the max RTP sequence number? |
Because libwebrtc use rtx for bandwidth estimate, it may send rtx packet without receiving NACK. |
I did some tests, if return True here, we may send duplicate rtp packets to the consumer. |
libwebrtc may send duplicate rtx packets to estimate bandwidth. When there is packet loss, we may receive rtx packet with seq higher than rtp packet.
Hi, the scenario you describe is when the rtx packet arrives before the rtp packet with the corresponding seq number, and the rtp packet is not really lost, in this case, the modification of return true will cause mediasoup to send duplicate rtp packet the consumer, right? I applied this modification to my project before, and found that the caton rate on the consumer side has decrease compared with the same conditions, but I didn't notice the problem that duplicate seq number packets may be sent by mediasoup, thank you point out this problem, if I have a better way to modify it, I will submit it to this issue again, thanks~ |
There are two situations:
#912 considered the second situation. |
We don't forget about this, it's just that we are focused on some incoming huge changes and prefer to handle this PR after them. |
Hello @penguinol , Does I miss something? In probe state, Pacer deliver the the media rtp packets as probe packet directly. only padding packets in rtx. What's the situaltion sent the rtx packet with seq_num 3? |
Hello, I want to inquire about a problem that NACK is sent but no retransmission succeed.
The scenario is as follows: SDK pushes the stream to mediasoup server1, and mediasoup server2 receives this stream from mediasoup server1 and then restores the packet to a frame (mediasoup server2 as consumer and receive data through pipetransport).
When I set the packet loss rate to 10% (the rtt is small) in test enviroment, I found that mediasoup server2 would sometimes request a packet with a certain sequence number until it finally reached the maximum number of times, and mediasoup server1 received the NACK of this sequence number packet message, but the packet buffer of this sequence number was not found in the send buffer of the consumer.
I continued to debug it and found that the problem is:
Suppose mediasoup server1 received RTP packets with sequence numbers 1, 2, 3, 4, and then received RTX packets with original sequence numbers 5 (the RTP packets with sequence numbers greater than 5 have not been received now), and later received RTP packet with sequence number 7. Because the sequence is out of order, nackGenerator will generate the NACK message of the seq=6 packet (the packet with the sequence number 5 will not be required to retransmit because it has been marked in the recoverList), but when the RTX packet with the original sequence number 5 is received, this sequence number is not in the In the nackList, so the packet with sequence number 5 was discarded and was not forwarded to the consumer (mediasoup server2). The seq=6 packet was finally retransmitted to the mediasoup server2 successfully, but the seq=5 packet was discarded, even if the mediasoup server2 kept requesting retransmission, it could not be retransmitted.
I compared the processing logic of NackModule::OnReceivedPacket in nack_module.cc in webrtc, and found that in this case, webrtc just inserts the packet into the recoverList, does not require retransmission, but it does not discard the packet, and It is to continue to stuff data into the packetBuffer in RtpVideoStreamReceiver.
I would like to ask, what is the purpose of not forwarding this packet to consumers here? Is it better to return true here, thanks
The text was updated successfully, but these errors were encountered: