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

Make NACK buffer cleanup on outgoing keyframe configurable (see #2401) #2402

Merged
merged 2 commits into from
Oct 30, 2020

Conversation

lminiero
Copy link
Member

@lminiero lminiero commented Oct 22, 2020

See this post and #2401 for reference.

This PR adds a new janus.jcfg property called nack_optimizations to enable the behaviour master currently has, that is, the ability to clean the NACK buffer any time we're sending a keyframe to the peer. Quoting from the configuration file, which explains the property and the rationale:

# Janus can do some optimizations on the NACK queue, specifically when
# keyframes are involved. Namely, you can configure Janus so that any
# time a keyframe is sent to a user, the NACK buffer for that connection
# is emptied. This allows Janus to ignore NACK requests for packets
# sent shortly before the keyframe was sent, since it can be assumed
# that the keyframe will restore a complete working image for the user
# anyway (which is the main reason why video retransmissions are typically
# required). While this optimization is known to work fine in most cases,
# it can backfire in some edge cases, and so is disabled by default.
#nack_optimizations = true

The property can also be dynamically changed via Admin API, e.g.:

curl -d '{"janus": "set_nack_optimizations", "admin_secret": "janusoverlord", "transaction": "123", "nack_optimizations": true}' http://localhost:7088/admin

@atoppi
Copy link
Member

atoppi commented Oct 23, 2020

lgtm 👍

@lminiero
Copy link
Member Author

Merging.

@lminiero lminiero merged commit 959eb8c into master Oct 30, 2020
@lminiero lminiero deleted the pli-nacks-tweak branch October 30, 2020 09:50
PauKerr pushed a commit to caffeinetv/janus-gateway that referenced this pull request Nov 11, 2020
clone1018 pushed a commit to Glimesh/ops that referenced this pull request Feb 14, 2021
* Bump janus version to 0.10.9

Relevant change is disabling NACK buffer cleanup on outgoing keyframe by default [meetecho/janus-gateway/pull/2402], this may reduce the impact of packet loss and the frequency of grey frames.

* Bump libnice to 0.1.18

The relevant change is they use sendmmsg if possible to send multiple packets in one call, which should be more efficient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants