View Single Post
Old 1st November 2021, 17:14   #39  |  Link
stephen22
Registered User
 
Join Date: Jan 2007
Posts: 88
There 'tis done. Finally cracked the diabolical ConditionalReader syntax (phew!)

Code:
source=AVISource( "D:\Video\wares-28-09-2021-17-35-08.avi" ).trim(5000,6000)

stepcode=0

super = MSuper(source)
backward_vectors = MAnalyse(super, isb = true, delta=1)
forward_vectors = MAnalyse(super, isb = false, delta=1)
interp = MFlowInter(source,super, backward_vectors, forward_vectors, time=50, ml=70).subtitle("**")

final=Scriptclip(source,"stepcode=stepcode+framecode"+ chr(13) + \
"framecode < 1 ? selectevery(source,1,stepcode) : selectevery(interp,1,stepcode)")
final2=ConditionalReader(final, "spreadsheet.txt", "framecode", true)

return final2
It'll need tweaking when you sort out your spreadsheet program - for instance I think Insert_after should be insert_before and the interp file may need a nudge.

With the text file example in my previous post, the output would be


Frame 0=source frame 0, stepcode=0
Frame 1=source frame 1
Frame 2=source frame 2
Frame 3=interp frame 2, stepcode= -1
Frame 4=source frame 3, stepcode= -1
Frame 5=source frame 5, stepcode=0
etc

(Must be reset with F2 if you fiddle with the timeline or the value of stepcode is corrupted)

Last edited by stephen22; 1st November 2021 at 17:32.
stephen22 is offline   Reply With Quote