fix(audio): bump rusty-opus to 1.x for working in-band FEC #1

Merged
shjackal merged 1 commit from fix/rusty-opus-1 into main 2026-11-01 20:12:44 +01:00
Owner

Summary

qrtc enables in-band FEC on its Opus encoder (use_inband_fec = true, packet_loss_perc = 10 in AudioSender::new). With rusty-opus 0.9.1 the encoder's LBRR data is malformed, so libopus decodes the stream as loud garbage and the far end hears constant crackling. rusty-opus 1.0.0 fixes the in-band FEC encoder, but qrtc's "0.9" requirement cannot resolve to it. This bumps the requirement to "1" and refreshes the lockfile (1.0.2). No source changes.

Upstream issue: https://github.com/crabnebula-dev/qrtc/issues/16

Evidence

Same 5 s signal encoded by rusty-opus (20 ms frames, 48 kHz mono, VoIP, 32 kbps, FEC on) and decoded with the system libopus. Output RMS, input RMS 0.048 (quiet) and 0.196 (normal):

Before (rusty-opus 0.9.1, FEC on) After (rusty-opus 1.0.2, FEC on)
quiet: 0.193 (peak 1.01, about 4x too loud, clipping)
normal: 0.218
quiet: 0.045
normal: 0.195

With FEC off both versions decode correctly (0.045 and 0.196), so only the 0.9.1 FEC path is broken. With louder speech-like input the 0.9.1 error was 18-24x too loud.

Real call: a Tauri build of RKD against this branch (FEC left on) was clean on a phone, including loud speech; the same build against 09fb521 crackled constantly.

cargo test --lib: 34 passed, 0 failed, 1 ignored.

Merge danger

  • Door: two-way. A revert PR restores 0.9.1 and the old lockfile.
  • Blast radius: only consumers of this copy (RKD's Linux Tauri build through a [patch]). Upstream is untouched.

Not verified / follow-ups: sbom/qrtc.cdx.json still lists rusty-opus 0.9.1, so upstream's "SBOM matches Cargo.lock" CI job would fail on this commit (needs cargo-cyclonedx 0.5.9 and node tests/sbom-check.mjs --update). cargo deny was not run.

## Summary qrtc enables in-band FEC on its Opus encoder (`use_inband_fec = true`, `packet_loss_perc = 10` in `AudioSender::new`). With `rusty-opus` 0.9.1 the encoder's LBRR data is malformed, so libopus decodes the stream as loud garbage and the far end hears constant crackling. `rusty-opus` 1.0.0 fixes the in-band FEC encoder, but qrtc's `"0.9"` requirement cannot resolve to it. This bumps the requirement to `"1"` and refreshes the lockfile (1.0.2). No source changes. Upstream issue: https://github.com/crabnebula-dev/qrtc/issues/16 ## Evidence Same 5 s signal encoded by `rusty-opus` (20 ms frames, 48 kHz mono, VoIP, 32 kbps, FEC on) and decoded with the system libopus. Output RMS, input RMS 0.048 (quiet) and 0.196 (normal): | Before (rusty-opus 0.9.1, FEC on) | After (rusty-opus 1.0.2, FEC on) | | --- | --- | | quiet: 0.193 (peak 1.01, about 4x too loud, clipping)<br>normal: 0.218 | quiet: 0.045<br>normal: 0.195 | With FEC off both versions decode correctly (0.045 and 0.196), so only the 0.9.1 FEC path is broken. With louder speech-like input the 0.9.1 error was 18-24x too loud. Real call: a Tauri build of RKD against this branch (FEC left on) was clean on a phone, including loud speech; the same build against `09fb521` crackled constantly. `cargo test --lib`: 34 passed, 0 failed, 1 ignored. ## Merge danger - **Door:** two-way. A revert PR restores 0.9.1 and the old lockfile. - **Blast radius:** only consumers of this copy (RKD's Linux Tauri build through a `[patch]`). Upstream is untouched. Not verified / follow-ups: `sbom/qrtc.cdx.json` still lists rusty-opus 0.9.1, so upstream's "SBOM matches Cargo.lock" CI job would fail on this commit (needs `cargo-cyclonedx` 0.5.9 and `node tests/sbom-check.mjs --update`). `cargo deny` was not run.
fix(audio): bump rusty-opus to 1.x for working in-band FEC
Some checks failed
CI / no C code in pure Rust builds (push) Has been cancelled
CI / cargo-deny (advisories, licences, bans, sources) (push) Has been cancelled
CI / SBOM matches Cargo.lock (push) Has been cancelled
CI / post-quantum TLS vs OpenSSL (pq-hybrid) (push) Has been cancelled
CI / post-quantum TLS vs OpenSSL (pq-moduletto) (push) Has been cancelled
CI / interop with Chromium (DTLS 1.2 and post-quantum DTLS 1.3) (push) Has been cancelled
CI / test (macos-latest, default) (push) Has been cancelled
CI / fmt, clippy (default) (pull_request) Has been cancelled
CI / fmt, clippy (pure Rust, RustCrypto ML-KEM) (pull_request) Has been cancelled
CI / fmt, clippy (pure Rust, moduletto) (pull_request) Has been cancelled
CI / fmt, clippy (classical) (pull_request) Has been cancelled
CI / test (macos-latest, default) (pull_request) Has been cancelled
CI / test (ubuntu-24.04-arm, default) (pull_request) Has been cancelled
CI / test (ubuntu-latest, default) (pull_request) Has been cancelled
CI / test (macos-latest, pure Rust) (pull_request) Has been cancelled
CI / test (ubuntu-24.04-arm, pure Rust) (pull_request) Has been cancelled
CI / test (ubuntu-latest, pure Rust) (pull_request) Has been cancelled
CI / test (macos-latest, classical) (pull_request) Has been cancelled
CI / test (ubuntu-24.04-arm, classical) (pull_request) Has been cancelled
CI / test (ubuntu-latest, classical) (pull_request) Has been cancelled
CI / test (windows-latest, default, experimental) (pull_request) Has been cancelled
CI / MSRV 1.91 (default) (pull_request) Has been cancelled
CI / MSRV 1.91 (pure Rust) (pull_request) Has been cancelled
CI / MSRV 1.91 (classical) (pull_request) Has been cancelled
CI / no C code in pure Rust builds (pull_request) Has been cancelled
CI / cargo-deny (advisories, licences, bans, sources) (pull_request) Has been cancelled
CI / SBOM matches Cargo.lock (pull_request) Has been cancelled
CI / post-quantum TLS vs OpenSSL (pq-hybrid) (pull_request) Has been cancelled
CI / post-quantum TLS vs OpenSSL (pq-moduletto) (pull_request) Has been cancelled
CI / interop with Chromium (DTLS 1.2 and post-quantum DTLS 1.3) (pull_request) Has been cancelled
059ed81812
AudioSender enables in-band FEC (use_inband_fec, packet_loss_perc = 10).
With rusty-opus 0.9.1 the encoder's LBRR data is malformed and libopus
decodes the stream as loud, crackling garbage. rusty-opus 1.0.0 fixes
the in-band FEC encoder; the 0.9 requirement cannot resolve to it.

No source changes: the library builds and its tests pass unchanged.

Refs crabnebula-dev/qrtc#16
shjackal deleted branch fix/rusty-opus-1 2026-11-01 20:12:44 +01:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nanoya-biz/qrtc!1
No description provided.