mirror of
https://github.com/mumble-voip/mumble.git
synced 2026-03-03 00:46:56 -05:00
Use Opus FEC (Forward Error Correction)? #2005
Labels
No labels
GlobalShortcuts
Hacktoberfest
accessibility
acl
asio
audio
bonjour
bsd
bug
build
certificate
ci
client
code
documentation
external-bug
feature-request
gRPC
github
good first issue
help wanted
help-needed
ice
installer
linux
macOS
needs-ckeck-with-latest-version
needs-more-input
overlay
positional audio
priority/P0 - Blocker
priority/P1 - Critical
priority/P2 - Important
priority/P3 - Somewhat important
priority/P4 - Low
public-server-registration
qt
recording
release-management
server
stale-no-response
stale-support
support
task
test
theme
translation
triage
ui
windows
wontfix
x64
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mumble-mumble-voip#2005
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nh2 on GitHub (Oct 5, 2020).
Opus has an in-band FEC (Forward Error Correction) feature that helps with packet loss (at cost of of a bit more bandwidth).
It works by "including a coarse encoding of the previous packet in the next packet" (see page 13 of this presentation).
It may be beneficial for Mumble to use that to improve audio quality under packet loss. Mozilla did an experiment on the effectiveness of Opus FEC including audio samples.
How to enable FEC
FEC is quite easy to enable as described in https://ddanilov.me/how-to-enable-in-band-fec-for-opus-codec/:
Sending side
Simply enable it with a flag here:
Receiving side
To decode a missing packet by using the FEC data in the next packet, you call
opus_decode_float(.., decode_fec=1)on the data of the next packet.Mumble's existing call to
opus_decode_float()is here.Open questions
I've played around a bit with implementing this on top of Mumble 1.3.2, but have not succeded yet. Questions:
jitter_bufferon Opus packets, and that one's API only allows you to pop out the next packet, not to peek at the subsequent packet.Thanks!
@Krzmbrzl commented on GitHub (Oct 5, 2020):
In general anything that can improve the way Mumble handles packet-loss is would be very welcome. So if you get this to work, that'd be great 👍
@davidebeatrici commented on GitHub (Oct 5, 2020):
Should be pretty easy to implement and only client-side changes are required.
What happens when a client sends a non-FEC packet though (backward compatibility)? Is decoding still possible?
@nh2 commented on GitHub (Oct 7, 2020):
Yes, according to http://lists.xiph.org/pipermail/opus/2013-January/001904.html
where PLC is Opus's normal Packet Loss Concealment.
The link has another useful statement:
@davidebeatrici Do you have a tip how one should get at the "next packet" from the
jitter_buffer?@trudnorx commented on GitHub (Nov 29, 2020):
FEC should be optional because it adds delay (see http://lists.xiph.org/pipermail/opus/2013-January/001904.html) and a major Mumble goal is to be low latency. Today, many Internet connections have extremely low packet loss. I do not experience audio glitches while using Mumble so for me there would be no benefit from the option and only drawbacks. However, it could be useful for people in some environments.
I suppose making it optional means that OPUS_SET_INBAND_FEC and OPUS_SET_PACKET_LOSS_PERC are only set from the sender side in case they turned FEC on, and from the receiver side opus_decode_float should only be called with decode_fec=1 on packets from users that have FEC on.
@ancarda commented on GitHub (May 23, 2021):
This is true for wired Internet, but less true for wireless and satellite Internet.
I agree most people would benefit from not using FEC when packet loss is low -- so latency can be lower -- but wouldn't it make sense to also have FEC available as an option? In particular, when using Mumble on cellphone? I have friends who hang out on Mumble, and when we're not playing games together, I'd like to go on a walk and chat to them, but 4G packet loss is actually too high and people complain they can't hear me
I believe FEC would help a lot with that
@J0s3f commented on GitHub (Mar 5, 2024):
Opus now even has Machine Learning based deep-plc in the decoder and Deep REDundancy (DRED) in the encoder: https://opus-codec.org/demo/opus-1.5/
Mumble should compile them in the Opus library and provide options to enable them.
@Krzmbrzl commented on GitHub (Mar 22, 2025):
#6757
@shithubsucks commented on GitHub (Jun 16, 2025):
deep learning in audio codecs is not always of benefit, and can be more of a fad by actually decreasing audio inteligibility.