Having just posted the below code fragment in another thread, I thought it might be a good
idea to also post it here, so I dont forget it.
Code:
avisource("d:\avs\avi\1.avi").ConvertToYV12() # The test clip was RGB
Writefileif("d:\avs\avi\1.txt","YDifferenceFromPrevious>=0.1 || current_frame==0",""" "0," ""","current_frame",append=false)
The above code would produce a Prune() command file to keep all frames with a difference in the Luma from
the previous frame of 0.1 or greater. The condition to keep could be changed for another application.
In the above, it would be used to keep frames that were different and throw away duplicates.
You may only want to use this as a last resort if you can find no other way to do something.