Skip to content

fix(producer): warn when audio gain changes in quiet mode - #6873

Open
miguel-heygen wants to merge 1 commit into
mainfrom
fix/aac-delivery-20261031
Open

miguel-heygen wants to merge 1 commit into
mainfrom
fix/aac-delivery-20261031

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

Local render audio gain reductions now remain visible with --quiet.

Why

The true-peak guard changes the delivered audio level. Its info-level message disappeared with the CLI’s warn-level quiet logger, so users could miss the reason their render was quieter.

Related work

Refs #6871 and #5669. Current main already includes #6089 (fit PCM to exact video frames before AAC) and #6312 (make peak corrections from retained PCM). Upgrading from 0.8.143 gets those changes. This PR fixes the remaining hidden warning; it does not remove the post-codec ceiling check or promise a single encode candidate.

How

Log actual attenuation at warn level and retain audioLoweredDb metadata. Document the quiet behavior. Add real-media coverage showing frame-fitted AAC survives duration normalization with identical packet hashes at 30 and 30000/1001 fps.

Size

One production log-level change, focused regression coverage, and one CLI documentation row. No encoder policy or dependency changes.

Fails without the fix

The regression uses the real createConsoleLogger("warn"): before the fix it receives no attenuation warning (1 failure, 20 passing); after the fix it observes the warning and unchanged metadata. The packet-preservation tests protect existing fixes and already pass on main.

Test plan

  • Unit tests added/updated: 39 Vitest and 40 Bun tests pass.
  • Manual testing performed: four real FFmpeg integration cases pass, including two packet-preservation cases. Video frame probing is injected; mixing, audio probing, peak checking and packet copying are real.
  • Documentation updated: --quiet retains audio gain warnings.
  • Comments follow CONTRIBUTING.md: no new production comments.

Linux FFmpeg 7.0.2 with cached dependencies. No full browser render or macOS FFmpeg 9.0.2 onset-artifact reproduction is claimed. AAC correction may encode multiple candidates from the same PCM; legacy/external AAC requiring a real duration correction can still be transcoded. Distributed planning does not yet propagate attenuation metadata; that pre-existing disclosure gap remains outside this local-render patch.

@mintlify

mintlify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Oct 31, 2026, 3:24 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES · 2 blocker · 0 important · 0 nits · b5ab72f

The warn-level change is right: the CLI's --quiet maps to createConsoleLogger("warn"), and Docker renders still echo stderr.

  • blocker — PR body: there is no literal fails without the fix: line naming the test. The ## Fails without the fix heading and its prose don't name it. Suggested line: fails without the fix: assembleStage.test.ts › runAssembleStage limiter honesty › keeps an audible gain change visible with the CLI's quiet logger. I confirmed it is red when the base assembleStage.ts is restored. Two tests fail there, not one: the updated records and logs how far the true-peak limiter lowered the mix pin also goes red.
Scope

Read all 4 files. Ran assembleStage.test.ts at head (21/21) and with the base source (2 failed), and ffprobeArgvContract.test.ts at head (1 failed, ↓ inline). Grepped every audioLoweredDb and Audio lowered reader; none pin the info level. CI was still running when this was posted.

— Genesis

"-show_entries",
"packet=data_hash",
"-of",
"csv=p=0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocker: this ffprobe argv has no "--" before path, so src/utils/ffprobeArgvContract.test.ts fails in the Producer unit lane. I ran it locally at this head: audioPadTrim.integration.test.ts terminates options immediately before the input fails with "csv=p=0" , path. The older probe in this same file already uses the terminator.

Suggested change
"csv=p=0",
"csv=p=0",
"--",

@github-actions

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 108 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

Unstable (1)

  • seqplainkeys-none-center-r0-root-z100: tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

This branch was successfully deployed

1 active deployment
staging - docs — b5ab72f5 Deployed Oct 31, 2026 by mintlify[bot]
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.

1 participant