dwilbank
10th March 2013, 00:02
I found this useful script here on Doom9 - but the thread is a few years old.
It basically gives you a txt file of frame numbers in which the luma is below a certain threshold.
Is there a way to make it look at every fifth frame instead of every frame?
I obviously want to speed up the processing (finding long commercial blacks).
Thanks
#Specify the name and location of the output file
filename = "c:\output_blank_frames.txt"
#Specify the threshold that will be considered black (0 = pure black)
global blankthreshold=28
#DirectShowSource("black_frames_av2i.avi").killaudio()
AVISource("black_frames_test.avi").killaudio()
#Only look at half the fields (speeds up processing
i=separatefields.selectodd.ConvertToYV12()
#Write the frame number
WriteFileIf(last, filename, "(AverageLuma(i)<blankthreshold)", "current_frame+1", append = false)
It basically gives you a txt file of frame numbers in which the luma is below a certain threshold.
Is there a way to make it look at every fifth frame instead of every frame?
I obviously want to speed up the processing (finding long commercial blacks).
Thanks
#Specify the name and location of the output file
filename = "c:\output_blank_frames.txt"
#Specify the threshold that will be considered black (0 = pure black)
global blankthreshold=28
#DirectShowSource("black_frames_av2i.avi").killaudio()
AVISource("black_frames_test.avi").killaudio()
#Only look at half the fields (speeds up processing
i=separatefields.selectodd.ConvertToYV12()
#Write the frame number
WriteFileIf(last, filename, "(AverageLuma(i)<blankthreshold)", "current_frame+1", append = false)