Replies: 2 comments
-
The status of the SRS (Software Requirements Specification). According to the definition in RFC 8834: https://datatracker.ietf.org/doc/html/rfc8834#name-negative-acknowledgements-a
|
Beta Was this translation helpful? Give feedback.
-
If RTX is not supported, WebRTC will retransmit the original packet with new TWCC number. Open the capture file nack-drop-seq8331-pt109.pcapng.zip by wireshark, check the packet:
Now, due to delay, both the original and retransmission packet are arrived, then the retransmission packet fail the SRTP decrypt:
Note that even enable the
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have roughly reviewed the relevant materials again, and there are actually three methods for Retransmission (packet retransmission):
WebRTC Legacy
WebRTC Legacy, reusing the same SSRC and PT. This method is a non-RFC 4588 defined RTX approach, which is currently supported by SRS. It is one of the earliest implemented methods and is relatively simple. Some MCU devices only support a single SSRC, which is why Chrome has continued to support this method. The current documentation clearly states that if RTX is not negotiated, it refers to this method of retransmission. Since there is no special definition in the RTP protocol part, relying only on the RTCP protocol to send NACK requests to retransmit lost packets, there is no separate RFC defining this method. In other words, the relevant RFCs are the standard RTP and RTCP packets.
The definition according to the relevant documentation:
https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/retransmittedBytesSent
https://www.w3.org/TR/webrtc-stats/
The definition of the relevant code: In the libwebrtc code of Chrome, if an RTX SSRC is not configured, the receiver does not create a dedicated RtxReceiveStream to handle it. Instead, retransmit detection is enabled for the main stream.
In fact, this method has been criticized in RFC 4588, which states that it causes confusion in the receiver's statistics.
One approach may be to retransmit the RTP packet with its original sequence number and send original and retransmission packets in the same RTP stream. The retransmission packet would then be identical to the original RTP packet, i.e., the same header (and thus same sequence number) and the same payload. However, such an approach is not acceptable because it would corrupt the RTCP statistics.
For instance, if a packet arrives slightly delayed and the receiver assumes it is lost, the sender will resend the lost packet. Consequently, the receiver might receive duplicate packets. Although the receiver can discard these duplicates, the packet loss count defined in RTP 3550 could become negative, which may lead to certain issues:
https://datatracker.ietf.org/doc/html/rfc3550
WebRTC RTX
WebRTC supports RTX retransmission with multiplexing SSRC, which involves transmitting RTP video packets using two SSRCs and Payload Types (PT), as defined by RFC 4588's ssrc-multiplexing. Specifically, WebRTC mandates in RFC 8834 that receivers must implement this feature, while it is optional for senders. Typically, two SSRCs and PTs are negotiated in the SDP, for example, one might be PT 109 (SSRC 579114133) and the other PT 114 (SSRC 2751628478). These two are bound together through an ssrc-group, indicating they are part of the same RTP stream, which in this case is a video stream.
The implementation details for this aspect of WebRTC are defined in the document located at:
https://datatracker.ietf.org/doc/html/rfc8834#name-negative-acknowledgements-a
Compared to the legacy method of WebRTC, this approach sends dropped packets using a separate SSRC, with independent sequence numbers, payload types, and SSRC values. When tallying packets, this prevents the original SSRC's packet count from being duplicated, allowing for a more accurate calculation of packet loss. It also facilitates the convenient determination of the number of lost, late, and retransmitted packets.
Session Multiplexing
WebRTC does not support this method. RTX reuses the session, also known as the session-multiplexing defined in RFC 4588, using the same SSRC but different payload types (PT), and retransmits packets using a separate session and a distinct network 5-tuple. In RFC 8834, this is defined as an optional ("May") implementation, and in practice, it is seldom implemented.
Annex
The three methods mentioned utilize RTCP NACK. NACK is simply a notification from the receiving end indicating that it has not received a certain packet, which could either be due to the packet being lost or delayed in arrival.
TRANS_BY_GPT4
Beta Was this translation helpful? Give feedback.
All reactions