*SOLVED* Audio LEVELER not NORMALISER

Discussion of software apps
JimW
Posts: 25
Joined: Tue Jan 16, 2018 8:12 pm

*SOLVED* Audio LEVELER not NORMALISER

Post by JimW »

I have been looking (for years it seems) for a way to do what Audacity's "leveler" does, only in a script. Amplify the low volume portions of an audio file. All I can find for ffmpeg is "normalisation", which I interpret as "amplify to max without clipping". Not what I want! Yes, I can load the files into Audacity and run the "leveler" on it, then export it. But that requires me to be tied to the computer for a long time if I have many files to do.
So, does anyone know of a cli program/utility that will "LEVEL" the volumes of an audio file and can be accessed from a script? Audacity does not have many cli functions. Or failing that, instructions on ffmpeg that will do the same (NOT NORMALISE!!).
Last edited by JimW on Sun Feb 18, 2018 8:34 pm, edited 1 time in total.
User avatar
dai_trying
Posts: 634
Joined: Sun Jan 14, 2018 7:44 pm
Location: UK
Contact:

Re: Audio LEVELER not NORMALISER

Post by dai_trying »

I haven't tried this before (or had the need to) so I have no experience, but i did a quick search and found this forum post which might be of some use. please let us know if it helps as it would be good to know for future reference.

EDIT: Sorry, I was reading another post about scripting before this one and mixed the two up... Doh!
Scripting with audacity can be achieved but it requires jumping through quite a few hoops (compiling both audacity and some plugins/extensions) and is not particularly useful for most functions.

Scripting with FFmpeg is much easier and it could be possible with the right settings to get normalise to work as you wish, but as you expressed no wish to use that function I will not delve deeper. :)
JimW
Posts: 25
Joined: Tue Jan 16, 2018 8:12 pm

Re: Audio LEVELER not NORMALISER

Post by JimW »

I have no objection to using ffmpeg, just haven't found anything there that will do what I want in a script.
Many streaming interviews you will have the host and a guest, with the guest on telephone or skype. One will have very weak audio and the other will have very loud audio. Using Audacity I can bring the weak one up while maintaining or lowering the strong one. I would like to do that in a script. Currently, using ffmpeg, I just amplify the audio, which causes clipping of the stronger audio. Have to kinda balance the clipping with the amount I can boost the weak signal. Or use Audacity.
User avatar
dai_trying
Posts: 634
Joined: Sun Jan 14, 2018 7:44 pm
Location: UK
Contact:

Re: Audio LEVELER not NORMALISER

Post by dai_trying »

You could try this SU post and see if that gets you nearer to what you want, if you go with Option 3 of the accepted answer it should be relatively easy to get all the required parameters into variables for scripting, and then automating it shouldn't be too difficult.

Also if you have a small audio file you can post for testing I will see what I can come up with.
JimW
Posts: 25
Joined: Tue Jan 16, 2018 8:12 pm

Re: Audio LEVELER not NORMALISER

Post by JimW »

Unless the dynaudnorm would work? I had seen that page, but it looks like the dynaudnorm works only over a window, I don't know if the "window" can be the entire file or not.

Test file for you. In this case the host is low volume and the guest is max volume!
Well... the attachments button does not support mp3 files.
Nor does the drag and drop function.
Do I need to tar or zip it? It is 137.1KB in size.
JimW
Posts: 25
Joined: Tue Jan 16, 2018 8:12 pm

Re: Audio LEVELER not NORMALISER

Post by JimW »

Oh, as for option 3 -
My impression is that the same amplification is applied across the entire file. In the example given the entire file will receive a 5db amplification. If the maximum read is 0db then no amplification will be done on any of the file.
User avatar
dai_trying
Posts: 634
Joined: Sun Jan 14, 2018 7:44 pm
Location: UK
Contact:

Re: Audio LEVELER not NORMALISER

Post by dai_trying »

I have adjusted the allowed file size, it should upload now :)

I haven't read the whole page properly as I was just skimming to find something that would fit, I will read it properly when I have the file to practise on. At this stage I would guess you can give it the start/end settings to apply filter to only a portion of the file, but will confirm later.

re option 3
Will check/test as I test the file. :)
JimW
Posts: 25
Joined: Tue Jan 16, 2018 8:12 pm

Re: Audio LEVELER not NORMALISER

Post by JimW »

Ok, still will not accept mp3 files. Tar'd it for you.
Attachments
test.tar
test.tar
(140 KiB) Downloaded 142 times
User avatar
dai_trying
Posts: 634
Joined: Sun Jan 14, 2018 7:44 pm
Location: UK
Contact:

Re: Audio LEVELER not NORMALISER

Post by dai_trying »

I'm guessing there is another option somewhere to enable certain mime types, I'll look into that another time :)

Thanks for the file, I'll post back if I get something usable for you.
JimW
Posts: 25
Joined: Tue Jan 16, 2018 8:12 pm

Re: Audio LEVELER not NORMALISER

Post by JimW »

If you load it into Audacity, select all, go to effects and select Leveller with "heavier" setting you should see what I'm trying to do with a script. Actually this clip is pretty much ok for me, except for the guest being so loud that when I turn the volume down to a comfortable level for him then the host to too low.
Post Reply