garrysmod-chatsounds icon indicating copy to clipboard operation
garrysmod-chatsounds copied to clipboard

adding a sound volume property for the postprocessor

Open Techbot121 opened this issue 7 years ago • 4 comments

This is something I've been thinking for a while. When the preprocessor runs it gets the length of the soundsample, wouldn't it be also useful to have other information as well? For example sample-volume (or similar) so you could filter all sounds by volume and potentially, for instance, filtering out loud sounds locally.

Techbot121 avatar Sep 29 '18 11:09 Techbot121

Having an existing setup (i.e. the preprocessor) that inspects all files makes it easy(-ish) to further enhance it. I've always thought about what else might be useful other than just the duration itself. I'll look into volume/gain analysis and report back as to how easy it would be.

PotcFdk avatar Sep 29 '18 11:09 PotcFdk

Ok, apparently it might be possible with just ffmpeg/libav. To be specific, libavfilter's loudnorm filter seems to be able to do what we'd be interested in, but I have no idea how to use it. Using a separate lib would be an idea, or just slapping standard ReplayGain on all files and transferring that to the lists. Needs more investigation.

PotcFdk avatar Sep 29 '18 23:09 PotcFdk

or eventually calculate it yourself with a RMS measurement.

Techbot121 avatar Sep 30 '18 09:09 Techbot121

can we not cap the ^ to the listening client? Would not remove loud annoying sounds but it would at least prevent my ears from exploding

edunad avatar Jul 06 '19 18:07 edunad