Log in

View Full Version : AverageLuma: Invalid Arguments


wlndd6
21st February 2012, 19:34
I get a Script error: Invalid arguments to function "AverageChromaU" on this script. Does anyone know what the problem is?

If I display yvmask with info() it says that it is YV12.

LoadPlugin("C:\Users\1337\Desktop\video\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\Users\1337\Desktop\soooyeon.d2v", info=3)
LoadPlugin("C:\Users\1337\Desktop\video\megui\tools\avisynth_plugin\ColorMatrix.dll")
Load_Stdcall_plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
ColorMatrix(hints=true, threads=0)
yadif()
crop(440,0,-440,0)
clip=last

vectors = clip.MSuper().MAnalyse(isb = false,truemotion=false)
mask=MMask(vectors,ml=50)
yvmask=mask.converttoyv12()

clip.subtitle(string(AverageChromaU(yvmask)),align=7)

edit: i got it to work with
ScriptClip(clip, "Subtitle(String(AverageChromaU(yvmask)))")
instead of
clip.subtitle(string(AverageChromaU(yvmask)),align=7)

elizabethmc
22nd February 2012, 02:54
I have the same problem. Any help in this regard would be appreciated, thanks!

Guest
22nd February 2012, 05:09
Did you see the edit in the first post? It has the solution. If that does not work for you, then post your script and tell us what error you get.