Skip to content

Pin screen recording audio at 48 kHz after loudnorm - #502

Open
ijt wants to merge 1 commit into
omacom:quattrofrom
ijt:fix/screenrecording-48k
Open

ijt wants to merge 1 commit into
omacom:quattrofrom
ijt:fix/screenrecording-48k

Conversation

@ijt

@ijt ijt commented Sep 23, 2026

Copy link
Copy Markdown

Fixes #501.

finalize_recording() normalizes with ffmpeg loudnorm, which analyses at 192 kHz and declares that as its output rate. With no -ar, the AAC encoder caps that at 96 kHz, so every recording with audio is saved at 96 kHz even though wf-recorder is already passed -R 48000.

On Apple Silicon, playing that file switches the speaker PCM to 96 kHz. speakersafetyd then panics (Left: Negative power, bad ivsense data) and the kernel locks the amps. Reproduced on a J313: the 21:20 recording was AAC at 96000 Hz, and playback logged PCM rate: 96000..96000 immediately before the panic.

This pins the finalize pass at 48 kHz. Loudness normalization is unchanged. Same one-line fix as the still-open omacom#11092 / omacom#10970, which this tree cannot wait on: quattro here is the Asahi recorder path, and upstream has not merged it.

Tests

bash test/shell.d/screenrecording-sample-rate-test.sh

loudnorm declares a 192 kHz output rate, and the AAC encoder then writes
96 kHz. Playing that file switches the Asahi speaker PCM to 96 kHz and
speakersafetyd panics, locking the amps. wf-recorder is already passed
-R 48000; this finalize pass was rewriting it.

Fixes omacom#501

This branch has not been deployed

No deployments
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 recording finalize writes 96 kHz AAC and panics speakersafetyd

1 participant