Skip to content
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

Improve NACK responder #310

Open
k0nserv opened this issue Oct 7, 2022 · 1 comment
Open

Improve NACK responder #310

k0nserv opened this issue Oct 7, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@k0nserv
Copy link
Member

k0nserv commented Oct 7, 2022

The RFC for NACK talks about using heuristics to decide if it's worth resending RTP packets when receiving a NACK. For example, one can consider the age of the original packet and the known round trip time to make this decision.

The current implementation naively responds to all NACKs by sending every requested RTP packet. This is problematic as it can cause retransmissions to consume all available bandwidth and if the peer falls too far back it can mean media decoding ends up in a broken state.

A first step to improve this might be to introduce a configurable max elapsed time when NACKs are actioned e.g. in pseudo code:

// When handling incoming RTCP NACKs

for packet in feedback.requested_packets {
  if packet_sent_at.elapsed() > max_nack_age {
    // Don't send this packet and discard it from buffers
  } else {
    // resend requested packet
  }
}
@k0nserv k0nserv added enhancement New feature or request good first issue Good for newcomers labels Oct 7, 2022
@k0nserv
Copy link
Member Author

k0nserv commented Oct 7, 2022

#313 WIP take on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant