View Full Version : AVSAmp


Moitah
28th March 2005, 06:06
Here's a small command line tool I made to figure out a value to use with Amplify(). Just give it the path of your .avs, and it will calculate the value you need in Amplify() for audio normalized to 100% (audio must be 16 bit).

Sample output:
avsamp J:\Capture\cap01.avs
100%
Amplify by 3.627989 for full-scale.
If you want it normalized to some other percent, 96% for example, just multiply by 0.96. Hope this is useful for someone...

Download: v1.0.0 (http://www.moitah.net/download/latest/AVSAmp.zip) (Binary and Source)

Mug Funky
28th March 2005, 15:25
not to be a PITA, but replaygain would be very very very very cool here :)

like input a dB-below-fullscale and it'll give you an amplify statement that fits it to it... like -20dB.

i suppose if i'm going to be that anal, i'll just extract to wav and use foobar...

Moitah
28th March 2005, 17:45
Would it be good enough to just give the volume level calculated with ReplayGain and then you can do any other calculations yourself? Like if it tells you the RG volume is 93.5 dB, and you want to make it 89.0 dB, you can subtract yourself and come up with AmplifydB(-4.5)...

I'm not sure how to calculate the way you mentioned, does "dB-below-fullscale" even make sense in terms of ReplayGain?

dimzon
6th July 2006, 13:05
why not just use Normalize()

Mug Funky
10th July 2006, 05:02
@ Moitah:

hmm... now that i think about it, there's not a clear relation between -20db from fullscale and replaygain's values.

-20 is a reference level (as is -18dB in the UK) that is used for mastering video. i'd have to read up a bit on replaygain's method (that's 83dB SPL isn't it?) and figure out how to set it up to a "reference voltage" as it were. the figure -20 comes from reconciling analog with digital levels. -20 was decided to be equal to 0 VU on a calibrated VU meter. this means +10 VU (very loud peak) would be equal to -10dB from fullscale. analog tapes typically never peak above -10dB, but considering those were the days before look-ahead limiters, you can expect some peaks to go above it.

-20dB = 0 VU is basically a good figure for having lots of headroom in the digital domain to ensure clipping never happens.

now with that said, movies that come on digital tapes will conform to the -20dB reference, and will also replaygain at 83dB SPL, so that's encouraging - it may be that we don't have to do anything, and a simple conform-to-83dB would be enough.

okay, hope that made some kind of sense :)

btw, i'd be happy to have avsamp output a number - i can read that into a variable, and add a line to an avs all through a batch file, so that's no problem at all.

@ dimzon:

that would work too :) but my selfish intentions are not to normalize in the sense of peaking at fullscale, but to normalize in the true sense of everything being the same volume. i want to be able to encode ac3 with dialnorm set to -27, and mix level set to 83dB and never be wrong...