-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add packet concealment for opus decoder in audiobridge #3349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @spscream for preparing a clean PR for this feature. I've left some notes.
The main point of the discussion here is that we're basically ditching the FEC in favor of the PLC. There a couple of reasons for doing this:
- Packet concealment is something browsers already do (and it definitely helps when there is loss), however audiobridge is terminating the RTP, so having a mechanism like this will greatly help to match audio quality experienced in sfu/p2p.
- opus FEC is currently limited to a single packet, so it's totally useless in case of bursts of losses. Since bursts are probably the more frequent and disruptive case, PLC might have an advantage over FEC.
I'd be against that. While it may be true it's useless for bursts > 1, it's still much better than concealment when loss is indeed 1. |
I can add 1 fec packet recovery in case of first MISSING or INSERTION error, but It doesn't make sence too much. In our production environment fec recovery still leads to click sounds for some reason and I removed it completely. |
5b65bb2
to
c0fb5ab
Compare
I'm in general in favor of this feature since its current absence is one evidence that make p2p calls slightly better than audiobridge.
@spscream
|
c0fb5ab
to
6bba9f7
Compare
I'm sure fec were attached to packets, we use only latest chrome and electron clients. Losses were in bursts and spotty. I'm not sure how to implement fec now, since if first loss occured we generate plc now and output for encoder is going monotonically. If we delay generation of plc until second MISSING or INSERTION error, output of encoders will contain click sound, since input isn't monotonically anymore and empty input on encode will cause click sound. Is it encoder input has some sort of queue? If so I can try to postpone plc generation on first error until normal packet, if second MISSING or INSERTION error received, I will generate 2 plcs and don't use fec on subsequent JITTER_BUFFER_OK received. |
Code looks good now. |
@spscream FYI, we just merged a couple of important fixes in the AudioBridge, plus the (optional) support for RNNoise that we had open for quite some time. I noticed this unfortunately caused some conflicts in your PR, could you rebase on the latest changes when you can? In the next few days we plan to make some tests of your effort too ✌️ |
6bba9f7
to
aee8ecc
Compare
rebased |
aee8ecc
to
2af4fe3
Compare
@lminiero any updates on this? |
@spscream doing some tests with this PR. |
2af4fe3
to
575f398
Compare
I'm adding a "please test" tag since I think this PR is ready to be tested. We've tested it a bit and did not find such a remarkable difference in respect to the FEC. Nevertheless I personally think this is a better approach overall, primarily because the current opus FEC is limited to a single packet. |
@spscream I wanted to merge this, but I just noticed a conflict in the AudioBridge, probably due to some fixes we made this morning. Could you rebase so that I can finally merge this upstream? Thanks! |
68eeb81
to
60c907f
Compare
60c907f
to
0ffdb6e
Compare
@lminiero done, rebased |
Thanks! Merging then 👍 |
I made clear changes for adding of plc to audiobridge, based on #3308 and to address issue with crack noises #3297