Log in

View Full Version : statistics of WHOLE movie?


gwendolien
20th May 2013, 18:54
Is there any way to obtain characteristics of a WHOLE movie/scene like AverageLuma etc?

ChiDragon
20th May 2013, 21:35
One way:
WriteFile("movie.csv", "current_frame", """ "," """, "AverageLuma")

Load in VDub and Run Video Analysis Pass so that every frame is evaluated. You will need to delete frame 0 at the bottom of the file. Then open in your favorite graphing program.

gwendolien
21st May 2013, 08:41
Thanks ChiDragon.
This will print the AverageLuma of each individual frame.
Not exactly what I want but first of all:
I can't get it functioning.

dvd=dvd.Trim(0,145)
semicolon=";"
WriteFile(dvd, "F:\text.log", "current_frame", "semicolon", "AverageLuma", flush=true)
WriteFileEnd(dvd, "F:\text.log", """ "EndOfFile" """)

It generates a file with only "EndOfFile" in it....

StainlessS
21st May 2013, 10:51
ShowChannels might show what you want.
http://forum.doom9.org/showthread.php?t=163829&highlight=showchannels

gwendolien
21st May 2013, 12:17
Geeee, StainlessS, what subject/item you have not yet covered in detail!!

One question remains: is it possible to also get the info on the standard deviation like in RT_YplaneStDev...?

StainlessS
21st May 2013, 12:27
Have to go out now, be back later.

gwendolien
22nd May 2013, 13:03
Found a somewhat simple and thus slow way out:
A Function which, using Gscript, steps through all frames and collect the data wanted....
Took almost a night for a whole movie, for just one or two scenes, acceptable...

THANKS anyway!

StainlessS
22nd May 2013, 14:53
Sorry, got a bit waylayed.


Avisource("D:\avs\test.avi").Trim(0,-10)

X=0 Y=0 W=0 H=0 # Coords, as crop
YMIN=1 YMAX=2 YMINMAX=4 YMED=8 YAVE=16 YSTD=32 YIR=64 # YStats funcs
THRESHOLD=0.0 # YStats min, max, max-min
LO=128 # YStats YinRange
HI=255
FLGS = YMIN + YMAX + YMINMAX + YMED + YAVE + YSTD + YIR # YStats to get

ScriptClip("""RT_YStats(x=X,y=Y,w=W,h=H,threshold=THRESHOLD,lo=LO,hi=HI,flgs=FLGS) return Last""")
ShowChannels(x=X,y=Y,w=W,h=H,SetVar=True,Accfile="SC_WholeClip.Log",Show=True)

S="""String(current_frame)+"]" + \
"YAve="+String(SC_Ave_0,"%6.2f")+"," + \
"YMin="+String(SC_Min_0,"%3.f")+"," + \
"YMax="+String(SC_Max_0,"%3.f")+"," + \
"YLmn="+String(SC_LMn_0,"%3.f")+"," + \
"YLmx="+String(SC_LMx_0,"%3.f")+"," + \
"UAve="+String(SC_Ave_1,"%6.2f")+"," + \
"UMin="+String(SC_Min_1,"%3.f")+"," + \
"UMax="+String(SC_Max_1,"%3.f")+"," + \
"ULmn="+String(SC_LMn_1,"%3.f")+"," + \
"ULmx="+String(SC_LMx_1,"%3.f")+"," + \
"VAve="+String(SC_Ave_2,"%6.2f")+"," + \
"VMin="+String(SC_Min_2,"%3.f")+"," + \
"VMax="+String(SC_Max_2,"%3.f")+"," + \
"VLmn="+String(SC_LMn_2,"%3.f")+"," + \
"VLmx="+String(SC_LMx_2,"%3.f")+"," + \
" <---> " + \
"YMIN="+String(YS_yMin,"%3.f")+"," + \
"YMAX="+String(YS_yMax,"%3.f")+"," + \
"YMINMAX="+String(YS_yMinMaxDiff,"%3.f")+"," + \
"YMED="+String(YS_yMed,"%3.f")+"," + \
"YAVE="+String(YS_yAve,"%6.2f")+"," + \
"YSTD="+String(YS_yStdev,"%6.2f")+"," + \
"YIR="+String(YS_yInRng,"%6.2f")
"""

WriteFile("Frame.log", S, flush=true,append=false)


EDIT: There is some duplication above, its just a demo.