Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions demo/web/src/publish.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,6 @@ <h3 class="text-sm font-semibold text-neutral-300 flex items-center gap-2">
<input id="opus-plc" type="number" min="0" max="100" step="1" placeholder="auto"
class="mt-1 w-full bg-neutral-800 border border-neutral-700 rounded px-2 py-1 text-white text-sm">
</label>
<label class="flex items-center gap-2">
<input id="opus-dtx" type="checkbox" class="accent-blue-600"> DTX (discontinuous transmission)
</label>
</div>
</details>
<label class="block text-xs text-neutral-400">
Expand Down
3 changes: 0 additions & 3 deletions demo/web/src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ const opusFrameDuration = new Signals.Signal<number | undefined>(undefined); //
const opusComplexity = new Signals.Signal<number | undefined>(undefined); // 0 (fast) … 10 (best)
const opusFec = new Signals.Signal(false); // in-band forward error correction
const opusPacketLoss = new Signals.Signal<number | undefined>(undefined); // expected loss %
const opusDtx = new Signals.Signal(false); // discontinuous transmission (silence)

const ui = new Signals.Effect();

Expand Down Expand Up @@ -202,7 +201,6 @@ ui.run((effect) => {
...(complexity != null ? { complexity } : {}),
...(packetLoss != null ? { packetlossperc: packetLoss } : {}),
useinbandfec: effect.get(opusFec),
usedtx: effect.get(opusDtx),
};
publish.audio.codec.set(config);
});
Expand Down Expand Up @@ -275,7 +273,6 @@ bindOptionalSelect("opus-frame-duration", opusFrameDuration);
bindOptionalNumber("opus-complexity", opusComplexity);
bindOptionalNumber("opus-plc", opusPacketLoss);
bindCheckbox("opus-fec", opusFec);
bindCheckbox("opus-dtx", opusDtx);

// Audio codec selector: drive the codec kind and show the matching options panel.
const audioCodecEl = $<HTMLSelectElement>("audio-codec");
Expand Down
3 changes: 3 additions & 0 deletions doc/setup/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ These land with the next breaking release, not the 2026-09-23 train.
`mapping: None`; any other family is the mapping's own (`mapping.family()`).
Set `mapping` alone when building a surround head. The OpusHead bytes are
unchanged.
- **@moq/publish drops `OpusConfig.usedtx`.** Chromium's DTX output shifts the
audio timeline, so Opus DTX is always off (the WebCodecs default). Remove the
field; a plain-JS caller still passing it is ignored.

## Wire

Expand Down
8 changes: 5 additions & 3 deletions js/publish/src/audio/encoder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,12 @@ test("a push completing several frames keeps the encoder running", async () => {
]);
});

test("passes an explicit Opus DTX request to the encoder", async () => {
// Chromium stamps Opus output by counting the samples emitted, so every frame DTX suppresses pulls
// later audio earlier. A plain-JS caller passing the old knob must not reach the encoder.
test("never enables Opus DTX", async () => {
using _webcodecs = installFakeWebCodecs();
using env = await setup(new Baseline(), { mime: "opus", usedtx: true });
expect(env.config.opus?.usedtx).toBe(true);
using env = await setup(new Baseline(), { mime: "opus", usedtx: true } as Codec);
expect(env.config.opus?.usedtx).toBeUndefined();
});

// Another rendition on the same broadcast flushing with far less lateness leaves this one trailing
Expand Down
5 changes: 0 additions & 5 deletions js/publish/src/audio/encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ export type OpusConfig = {
complexity?: number; // 0-10, higher is better quality but more CPU
packetlossperc?: number; // 0-100, expected loss the encoder optimizes for
useinbandfec?: boolean; // in-band forward error correction
// Discontinuous transmission (silence suppression), off by default. Chromium stamps Opus output by
// counting the samples emitted, so each frame DTX suppresses pulls later audio earlier and the
// published timeline drifts from the capture clock until that is fixed.
usedtx?: boolean;
};

/** Cumulative encoder output totals, measured from the chunks the encoder produces. */
Expand Down Expand Up @@ -426,7 +422,6 @@ export class Encoder {
if (codec.complexity !== undefined) opus.complexity = codec.complexity;
if (codec.packetlossperc !== undefined) opus.packetlossperc = codec.packetlossperc;
if (codec.useinbandfec !== undefined) opus.useinbandfec = codec.useinbandfec;
if (codec.usedtx !== undefined) opus.usedtx = codec.usedtx;

return opus;
}
Expand Down
4 changes: 1 addition & 3 deletions quest/m0/audio-jitter-target/watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ about 22 s with skip-aheads on the way down.
- Manual run against the public relay on Chrome and Safari, the two rows the
issue measured, with a real microphone and 40 ms or more of added RTT. Watch
the stats panel's audio underrun counter and the latency tab's auto readout,
on both the isolated and the postMessage ring paths. Leave the publisher's
DTX off (the voice default since #4808) so the run measures network jitter
rather than DTX drift. Re-record the
on both the isolated and the postMessage ring paths. Re-record the
`relay-mic` trace in the same run (`just test audio-quality-record`); the
checked-in one used Chromium's fake capture device. Measure the publisher's
audio encoder input-to-output lag in the same run using the reporter's
Expand Down
1 change: 0 additions & 1 deletion quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ blocks. The quests that gated m0 lines moved under them.
- [Auth client CA](/quest/m1/relay-auth-client-ca.md) - `auth::Config::validate` and `init` take the client-CA flag, so no caller can skip the check
- [TS stats module](/quest/m1/ts-stats-module.md) - the TS stats types move under `ts::stats` as `Snapshot` and `Stream`, with an owned `track`
- [Audio capture without ALSA link](/quest/m1/capture-alsa-link.md) - moq-audio capture and playback build on Linux without linking libasound
- [Remove Opus DTX](/quest/m1/opus-usedtx-removal.md) - `@moq/publish` drops `usedtx`, since Chromium shifts the capture timeline under DTX
- [Capture by default](/quest/m1/capture-default.md) - moq-video and moq-audio build `capture` by default, so pre-merge checks test it and the capture gate goes away
- [Ship capture and playback](/quest/m1/cli-packaging.md) - a released moq binary can capture and play, which no distribution currently enables
- [moq.sh deploys from CI](/quest/m1/moq-sh-deploy.md) - the first `release` run of the moq.sh workflow deploys with the Workers Editor token
Expand Down
27 changes: 0 additions & 27 deletions quest/m1/opus-usedtx-removal.md

This file was deleted.

Loading