question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question about music volume and normalization

See original GitHub issue

Is your feature request related to a problem? Please describe. YouTube videos can have audio of varying volumes, as it depends on the person that mixed the audio into the video. This also makes that often, when playing music from YouTube, volume will vary greatly; some songs will be silent and others will suddenly be loud. This results in having to tweak the volume of the music bot often or have each user update the local volume when a new song starts.

Volume normalization such as ReplayGain exists, but, at least that case, is usually performed on existing files and saved into tags, which are then parsed by an audio player. ffmpeg also appears to have some options for normalization, but they appear to be intended mostly as a separate operation as well.

Mumble itself supposedly already supports amplifying the microphone volume of speakers (you can tweak the maximum volume adjustment in the advanced settings), so I’m wondering if there is some kind of solution here, e.g. by letting Mumble somehow automatically amplify the bot’s volume or, alternatively, let botamusique normalize the audio sending it?

Describe the solution you’d like Some sort of normalization for the audio sent by the bot so volume differences from input sources are roughly equalized.

Describe alternatives you’ve considered Don’t normalize at all, and let the user tweak the bot’s volume via the !volume command or by setting the local volume.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TerryGengcommented, Oct 1, 2020

Actually, I don’t really think mumble does any kind of normalization. I have some experience with the audio core of mumble and I haven’t seen such normalization in the code base of mumble.

We do have an on-the-fly audio level adjustment when sending an audio stream into mumble, which is simply multiplying the audio signal with the volume factor set by !v command. But if you want to normalize audio files, we need to analyze the volume peak and the average volume of that file, that is the difficult and time-consuming part.

A possible option is we read and analyzing the file while playing it, and gather the volume parameters for the next time this file being played so we know the normalization factor we need. Or we can simply run an analyzing thread in the background to calculate these factors.

You are not the first person asking for this feature, so now I think I should take this idea seriously.

0reactions
Gert-devcommented, Jan 7, 2021

On my side. I don’t like having a tool modifying the sound of a music.

I see what you mean. Normalizing the actual data is indeed an action that can change the original music data. This is also an advantage of the approach ReplayGain takes: analyze the music once, store the needed average dB increase/decrease somewhere (usually in tags), and automatically change the output volume rather than the music itself.

I’m not sure if the Mumble protocol allows changing your own input volume though; the way the Mumble client seems to do this is by having an input amplification that is applied as needed on the microphone input, which I think happens before transmission and by manipulating the input data itself, though I could be wrong.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to normalize audio? Why do it? Everything you need to ...
To normalize audio is to change its overall volume by a fixed amount to reach a target level. It is different from compression...
Read more >
What's Normalize Audio? – Should You Do It? - Prime Sound
We teach what audio normalizing means and if you should normalize your tracks. Read our in-depth guide to learn more.
Read more >
Volume Normalizing question | Steve Hoffman Music Forums
Assume track 1 has a volume of -2db and track 2 has a volume of -5db. Track 1 is louder? If so do...
Read more >
Audio Normalization: What Is It And Should I Care?
When you "normalize" an audio waveform (the blobs and squiggles), you are simply turning up the volume. Honestly, that's really it.
Read more >
In general, what's a good dB level at which to normalize my ...
When I save these extracted samples, I like them to be at roughly the same volume, so I normalize them. My audio editing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found