View Single Post
Old 15th November 2011, 22:23   #12  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
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.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 17th November 2011 at 21:41.
StainlessS is offline   Reply With Quote