Friday, May 18, 2018

What is ACK and NACK in RTCP feedback

ACK Mode
Used for point-to-point communications. Unicast address should be used in the session description.
From the RFC,

For unidirectional as well as bi-directional communication between  two parties, 2.5% of the RTP session bandwidth is available for RTCP  traffic from the receivers including feedback.  For a 64-kbit/s stream this yields 1,600 bit/s for RTCP.  If we assume an average of 96 bytes (=768 bits) per RTCP packet, a receiver can report 2 events per second back to the sender.  If acknowledgements for 10 events are collected in each FB message, then 20 events can be acknowledged per  second.  At 256 kbit/s, 8 events could be reported per second; thus, the ACKs may be sent in a finer granularity (e.g., only combining three ACKs per FB message).

From 1 Mbit/s upwards, a receiver would be able to acknowledge each individual frame (not packet!) in a 30-fps video stream.

ACK strategies MUST be defined to work properly with these bandwidth limitations.  An indication whether or not ACKs are allowed for a session and, if so, which ACK strategy should be used, MAY be conveyed by out-of-band mechanisms, e.g., media-specific attributes in a session description using SDP.

NACK Mode
Used for group sizes larger than 2, while it does not really strictly restrict to 2, it can be used also for point to point communications.

In simple terms the number of events to report per second may be derived from the packet loss rate and senders rate of transmitting packets. From these two values, the allowable group sizes for the immediate feedback mode can be calculated.

From the RFC,

Let N be the average number of events to be reported per interval   by a receiver, B the RTCP bandwidth fraction for this particular receiver, and R the average RTCP packet size, then the receiver operates in Immediate Feedback mode as long as N<=B*T/R.

And this below is an example from RFC

Example: If a 256-kbit/s video with 30 fps is transmitted through a network with an MTU size of some 1,500 bytes, then, in most cases, each frame would fit in into one packet leading to a packet rate of  30 packets per second.  If 5% packet loss occurs in the network  (equally distributed, no inter-dependence between receivers), then each receiver will, on average, have to report 3 packets lost each two seconds.  Assuming a single sender and more than three receivers, this yields 3.75% of the RTCP bandwidth allocated to the receivers and thus 9.6 kbit/s.  Assuming further a size of 120 bytes for the average compound RTCP packet allows 10 RTCP packets to be sent per second or 20 in two seconds.  If every receiver needs to report three  lost packets per two seconds, this yields a maximum group size of 6-7 receivers if all loss events are reported.  The rules for  transmission of Early RTCP packets should provide sufficient flexibility for most of this reporting to occur in a timely fashion.


References:
https://tools.ietf.org/html/rfc4585

No comments:

Post a Comment