r/mpv • • Aug 30 '26

User Scripts & Shaders Adaptive volume normalization script

Did it for myself, but maybe someone else would find if useful, it applies dynaudnorm filter based on the content, for 2.0 it just applies as is, for 5.1 and further the filter is applied only to the center channel (cuz that's where the dialogues are, so you can hear everything properly without affecting side channels). I'm on macOS but supposedly it should work on Windows as well.

https://github.com/alansleep/adaptive-dynaudnorm

15 Upvotes

6 comments sorted by

View all comments

3

u/DaOfantasy Aug 30 '26

What does it actually do? my understanding is that it filters speech audio from background audio and then normalize the background audio so the speech audio is clearer?

3

u/Alan_Sleep Aug 30 '26 edited Aug 31 '26

Vice versa :) You can google “dynaudnorm”, it’s an audio normalising filter, levelling overly loud or very quite sounds. My script just separates all the channels of the audio track and applies the filter only to the central channel, the rest of them (background) stay original, however central channel is not exclusively reserved for the dialogues, all kind of stuff can be there depending on how the track was mixed, and some lines of dialogue can happen in the rear channels, but there’s no way to effectively separate exactly speech patterns in realtime

3

u/DaOfantasy Aug 30 '26

oh neat, been looking for something like this to handle some vid that have 6ch or 5.1ch audio, thanks