View Full Version : AudioBoost for Avisynth: Possible issue with curve 2 or 4


LigH
24th April 2026, 10:07
I wrote the AudioBoost (https://github.com/LigH-de/AudioBoost) filter, and I am very grateful for everyone helping me in making it possible. And I am pretty sure that it worked well on the desktop PC with a Ryzen 7 CPU I made it on. Unfortunately, this PC is unavailable to me right now.

Instead I have a laptop with Ryzen 5 CPU here and discovered that it does not work well when using curve 2 or 4 (square or absolute ratio sigmoid). There is no useful output when the internal normalization is on, and when I switch it off I see in the stereo histogram that there is audio originating from the minimum point of both channels (not around [0,0] but above [-1,-1], the bottom point of the diamond shape ◇ the stereo graph plots).

Could anyone please try to confirm or deny with mentioning the CPU model, testing in x86 and x64? Thanks in advance.

fn = "" # your favorite audio source, e.g. wav or flac file etc.
c = 2 # compare 0..4

LwLibavAudioSource(fn)
ConvertAudioToFloat()
a=AudioBoost(curve=c, norm=false)
AudioDub(ColorBarsHD(), a)
Trim(0, Ceil(a.AudioDuration*FrameRateNumerator/FrameRateDenominator))
Histogram("audiolevels")
Histogram("stereooverlay")
Info()

hello_hello
24th April 2026, 18:21
I haven't used AudioBoost before, but I thought I'd give it a spin for you.

AMD Ryzen 9 7900X CPU (running Avisynth in Wine on Linux, although I doubt it matters).

Curves 1 & 3 seem fine, but curves 2 & 4 are severely clipped (I checked both the 32 and 64 bit flavours).

https://imgur.com/NQtaVpO.png

LigH
25th April 2026, 05:36
Same issue like mine, thank you. So I will have to fix that when I can use my PC again...

FranceBB
27th April 2026, 23:37
Intel i7 12800H 14c/20th (6 P Core / 12 P Thread + 8 E Core / 8 E Threads) with up to AVX2

Avisynth 3.7.5 r4289
Windows 11 Enterprise x64

same as you guys: c1 and c3 are fine, c2 and c4 are clipped out

c1 fine - c2 clipped out

https://images2.imgbox.com/be/27/oGAHau4E_o.pnghttps://images2.imgbox.com/d2/88/0WWQlLDR_o.png

c3 fine - c4 clipped out even more
https://images2.imgbox.com/3e/81/eyjKGUBe_o.pnghttps://images2.imgbox.com/4c/5d/Du7SPW6p_o.png

LigH
17th August 2026, 10:18
Fixed in AudioBoost 0.3 (https://github.com/LigH-de/AudioBoost/releases/tag/0.3).

Bonus: Added an experimental curve.

LigH
17th August 2026, 23:44
Added a second experimental curve in AudioBoost 0.3.1 (https://github.com/LigH-de/AudioBoost/releases/tag/0.3.1).

https://www.ligh.de/pics/Sigmoids.png

hello_hello
22nd August 2026, 13:25
Thank you!

LigH
22nd August 2026, 14:49
YW.

Added a third experimental curve in AudioBoost 0.3.2 (https://github.com/LigH-de/AudioBoost/releases/tag/0.3.2), cleaned the source, updated the documentation with beautiful curve graphs.

https://www.ligh.de/pics/Sigmoids032.png

https://www.ligh.de/pics/Sigmoids032norm.png

Jamaika
23rd August 2026, 10:59
fn = "" # your favorite audio source, e.g. wav or flac file etc.
c = 2 # compare 0..4

LwLibavAudioSource(fn)
ConvertAudioToFloat()
a=AudioBoost(curve=c, norm=false)
AudioDub(ColorBarsHD(), a)
Trim(0, Ceil(a.AudioDuration*FrameRateNumerator/FrameRateDenominator))
Histogram("audiolevels")
Histogram("stereooverlay")
Info()

Everything's fine, except the histogram isn't working for me. How do I enable the histogram in the latest Avisynth?

LigH
23rd August 2026, 17:44
Works for me in AviSynth+ v3.7.5.0 (stable). Which version is your "latest"?

Here a little trick to move the phase display to the right top corner:

fn = "" # your favorite audio source, e.g. wav or flac file etc.
b = 3.0
c = 2 # compare /*-3*/ 0..4

a = LwLibavAudioSource(fn).ConvertAudioToFloat().AudioBoost(boost=b, curve=c, norm=false)
v = ColorBarsHD(1280, 720, "YV24")
AudioDub(v, a)
Trim(0, Ceil(a.AudioDuration*FrameRateNumerator/FrameRateDenominator))
Histogram(mode="AudioLevels")
FlipHorizontal()
GetChannels(2, 1).Histogram(mode="StereoOverlay")
FlipHorizontal()
Info("DejaVu Sans Mono", 18)

Jamaika
23rd August 2026, 19:12
https://i.postimg.cc/ZqmmVbLg/114.png
Thanks for the reply. The Histogram(mode="AudioLevels") function doesn't work for me. Perhaps the function has been deleted in avisynth.

LigH
24th August 2026, 07:34
Since VapourSynth supports audio too, I would enjoy contribution adding such an interface too. Selur mentioned it doesn't work well as Avisynth plugin in VapourSynth.

Jamaika
24th August 2026, 07:52
I posted question.
https://github.com/AviSynth/AviSynthPlus/issues/513

tebasuna51
25th August 2026, 12:10
I used Dimzon's Audiolimiter to downmix 7.1 to 5.1,
maintaining the volume of the primary channels while simply mixing the four surround channels down to two. See BeHappy/MeGUI.

Since there is no 64-bit version available, I used SoxFilter (https://forum.doom9.org/showthread.php?p=1926777#post1926777) for this purpose (amplifying a half-volume mix by a factor of two while limiting the peak value).
MixAudio(blr, slr, 0.5, 0.5)
SoxFilter("compand 0.0,0.0 -90,-84,-8,-2,-6,-1,-0,-0.1")

I tested the various AudioBoost curves and found that the -3 setting slightly improves upon SoxFilter; the others progressively worsen the result.
Instead Soxfilter:
AudioBoost(boost=2.0,limit=1.0,curve=-3, norm=false)
to_boost (dB) boostSox (dB) boost-3 (dB) boost-1 (dB) boost-2 (dB) boost1 (dB) boost2 (dB) boost4 (dB) boost3 (dB)
------------ ---------------- ---------------- ---------------- ---------------- --------------- --------------- ----------------- ---------------- ----------------
RMS power L: 3.02% (-30.39) 6.03% (-24.40) 6.04% (-24.38) 6.00% (-24.43) 5.88% (-24.61) 5.85% (-24.66) 5.77% (-24.78) 4.86% (-26.27) 1.41% (-36.99)
RMS power R: 2.77% (-31.15) 5.53% (-25.15) 5.54% (-25.13) 5.51% (-25.17) 5.42% (-25.33) 5.38% (-25.38) 5.32% (-25.48) 4.50% (-26.94) 1.30% (-37.70)
Min value L: -60.38% (-4.38) -91.65% (-0.76) -97.53% (-0.22) -90.81% (-0.84) -87.00% (-1.21) -83.60% (-1.56) -77.02% (-2.27) -54.70% (-5.24) -17.28% (-15.25)
Min value R: -66.20% (-3.58) -92.92% (-0.64) -98.75% (-0.11) -93.20% (-0.61) -90.31% (-0.89) -86.78% (-1.23) -79.80% (-1.96) -56.97% (-4.89) -17.87% (-14.96)
Max value L: 54.17% (-5.32) 90.17% (-0.90) 94.85% (-0.46) 87.25% (-1.18) 82.57% (-1.66) 79.45% (-2.00) 73.48% (-2.68) 52.00% (-5.68) 16.54% (-15.63)
Max value R: 63.48% (-3.95) 92.34% (-0.69) 98.29% (-0.15) 92.18% (-0.71) 88.86% (-1.03) 85.37% (-1.37) 78.56% (-2.10) 55.94% (-5.05) 17.60% (-15.09)


(The last one doesn't amplify anything.)