The title says it all, I hoped to have a bit more ready but this is at least a bit over halfway to my stated goals.
The big news is the addition of a function type. This allows some interesting things like this:
def selector1(sdict):
a = sdict['N']
a = a % 2
b = {'val':a}
# return the index of the clip to select
return b
def selector2(sdict):
# for these functions the key 'N' holds the requested frame number
# and FX corresponds to the index of the frames
frame_properties = get_props(sdict['F0'])
if frame_properties['SomeFrameProperty'] < 0.5:
return {'val':0}
else:
return {'val':1}
# some source for clip0 and clip1 here
ret = core.std.SelectClip(clips=[clip0, clip1], src=[clip0], selector=selector1)
# ret will now return every other frame from clip0 and clip1 interleaved
# selector2 shows how frame properties can be factored into it