The following kiddiescript is nothing compared to StainlessS' professional work, but it is a simple way to get you 80% of the way there. Here's the output file containing flash frame numbers:
Flash Frame.txt
And here's the simple script:
Code:
#Script to find flash frames
filename = "e:\flash_frames.txt"
global flashthreshold=0.8
i=AVISource("E:\Documents\Dnload\UNPACK\join3.avi")
j=trim(i,1,0) #Previous frame
# Temporarily un-comment next line to display the average luma value on screen to help determine threshold value
#ScriptClip(i,"Subtitle(String(YDifferenceToNext(i) ))" )
#This finds the FIRST frame in a series that fall below the threshold
#WriteFileIf(i, filename, "(YDifferenceToNext(i)>flashthreshold)&&YDifferenceToNext(j)<flashthreshold", "current_frame+1", append = false)
#This line below will output EVERY frame that is below threshold, which results in LOTS of frames
WriteFileIf(i, filename, "(YDifferenceToNext(i)>flashthreshold)", "current_frame+1", append = false)
#The line below finds the LAST flash frame in a series
#WriteFileIf(i, filename, "(YDifferenceToNext(i)<flashthreshold)&&YDifferenceToNext(j)>flashthreshold", "current_frame+1", append = false)