• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN setAudioFilter('loudnorm') doesn't work?

Kablion

Member
Hi,

I tried to make a simple script for normalizing the loudness of the audio.
I put
Code:
var audio = require('audio');
audio.setAudioFilter('loudnorm');
inside the setup function, but when I then try to start a song it wont play.
There is no error message in the log or the console.
Either I don't understand what exactly setAudioFilter() does or Sinusbot is somehow not compatible to loudnorm?
The documentation is not really clear here and I can't see the actual code behind the function.
I guess it should not be to hard to get the script working, but I have no clue why it doesn't work.

Can anyone help me with this?
Having songs vary in loudness is very annoying.
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
The filter string should be passed directly to ffmpeg, the sinusbot doesn't process the filter on it's own.
Their documentation can be found here, I have no experience using them though.
You might need to set parameters in the filter for "loudnorm" to work (don't ask me how though, I've never used this).
 

Kablion

Member
The filter string should be passed directly to ffmpeg, the sinusbot doesn't process the filter on it's own.
Their documentation can be found here, I have no experience using them though.
You might need to set parameters in the filter for "loudnorm" to work (don't ask me how though, I've never used this).
Ok but:
1.) Why does Sinusbot have the function setAudioFilter? It's even in the documentation.
2.) How can I pass the filter to ffmpeg if Sinusbot actually uses it?

Sry I'm new to all of this.
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
Ok but:
1.) Why does Sinusbot have the function setAudioFilter? It's even in the documentation.
2.) How can I pass the filter to ffmpeg if Sinusbot actually uses it?

Sry I'm new to all of this.
You misunderstood what I wrote. The sinusbot uses ffmpeg to process audio, the filter should be passed by the sinusbot when you call setAudioFilter.
I haven't tested if setAudioFilter is working, try some examples from the ffmpeg documentation.
 

Kablion

Member
You misunderstood what I wrote. The sinusbot uses ffmpeg to process audio, the filter should be passed when you call setAudioFilter.
I haven't tested if setAudioFilter is working, try some examples from the ffmpeg documentation.
Ok I guess I have no clue how either sinusbot or ffmpeg work.
What you wrote makes no sense to me. I should pass it to ffmpeg when I call setAudioFilter? So as a parameter like I did?
Maybe you could write a short pseudo-code example? Doesn't have to be correct, just so I can understand what you mean.
Or maybe I should just stop trying, this all seems very complicated to me.

Anyways thank you!
 
Last edited:
Top