Skip to content

Pin recording audio sample rate at 48 kHz - #11092

Open
sandmor wants to merge 1 commit into
omacom:quattrofrom
sandmor:fix/screenrecording-audio-sample-rate
Open

Pin recording audio sample rate at 48 kHz#11092
sandmor wants to merge 1 commit into
omacom:quattrofrom
sandmor:fix/screenrecording-audio-sample-rate

Conversation

@sandmor

@sandmor sandmor commented Sep 10, 2026

Copy link
Copy Markdown

Every screen recording made with audio was written at 96 kHz AAC instead of the 48 kHz the recorder captured, because ffmpeg's loudnorm filter analyses at 192 kHz and declares that as its output rate. With no -ar pinned, the finalize pass negotiated that against the AAC encoder's 96 kHz ceiling, silently resampling the audio up. 96 kHz AAC is poorly supported downstream — DaVinci Resolve, for one, imports the clip with correct metadata but decodes no samples (silent audio, blank waveform) — and it costs bitrate for no benefit since the source is 48 kHz.

Fix by adding -ar 48000 to the finalize invocation in finalize_recording(). Loudness normalization is unaffected: a -21.1 dB source still lands at -13.6 dB against the -14 LUFS target.

Fixes #10970

loudnorm analyses at 192 kHz and declares that as its output rate, so
ffmpeg negotiated the AAC encoder's 96 kHz ceiling during finalize,
resampling captured 48 kHz audio up to 96 kHz (Fixes omacom/omarchy#
10970).
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.

Screen recordings with audio are written at 96 kHz AAC (loudnorm missing -ar)

1 participant