Conditional Audio Filters - MinMaxAudio v0.2

Usage:

Computes the root mean square, maximal or minimal value over all samples in all channels,
or just over all samples in channel, and outputs the value (in decibels) as a float.
It's a conditional audio filter, so the computation is done framewise. The audio is converted
to float internally.


Syntax:

AudioMax(channel) # maximal volume in channel (framewise)
AudioMin(channel) # minimal volume in channel (framewise)
AudioRMS(channel) # root mean square volume in channel (framewise)
# channel = 0 (default) means that the max/min/rms is taken over all samples in all channels (framewise)

Examples:

v = BlankClip(pixel_type="YV12")
a = Tone(type="Triangle", frequency=2, level=0.4)
w = AudioDub(v,a) #.Histogram(mode="audiolevels")
#w = ScriptClip(w, "Subtitle(String(AudioMax(1)))")
w = ScriptClip(w, "Subtitle(String(AudioRMS(0)))")
#w = ScriptClip(w, "Subtitle(String(AudioMin(1)))")
w = w #.ConvertToRGB32.AudioGraph(20)
return w

Note that the values are given in decibels (see also histogram docs for an explanation).

License:

Licensed under GPL by Wilbert Dijkhof