Skip to content

fix(enc-ffmpeg): preserve AAC quality for high sample rate inputs - #2895

Merged
richiemcilroy merged 4 commits into
CapSoftware:mainfrom
yashranaway:fix/aac-high-input-rate
Oct 23, 2026
Merged

richiemcilroy merged 4 commits into
CapSoftware:mainfrom
yashranaway:fix/aac-high-input-rate

Conversation

@yashranaway

@yashranaway yashranaway commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

the aac encoder picks the lowest supported rate at or above the input rate, and if none was high enough it fell back to the first entry of the sorted list, which is 7.35 khz. so audio from a 192 khz interface got squashed down to 7.35 khz and lost everything above about 3.5 khz.

now the fallback is the highest supported rate, 96 khz. inputs the codec already supports are unchanged. tests check the chosen rate for low, normal and too high inputs, and push a 12 khz tone at 192 khz through encode and decode to make sure it survives.

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

High-rate AAC inputs now fall back to the highest supported sample rate instead of the lowest.

  • AAC encoding keeps high-rate inputs at the codec’s highest supported rate.

Reviewed statically; tests were not run.

Reviews (1) · Last reviewed commit: "fix(enc-ffmpeg): preserve AAC quality fo..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

@yashranaway is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

@richiemcilroy
richiemcilroy merged commit b7b6053 into CapSoftware:main Oct 23, 2026
64 of 70 checks passed
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.

2 participants