View Single Post
Old 30th April 2017, 18:14   #9  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Joachim Buambeki View Post
Thanks for commenting Myrsloik.
Yes, that is part of what I want, the problem is that with your proposition I merge the current and 9 adjacent frames into one, then merge the next 19 and so on, leaving me with a speedup factor of 19.
What I want to do is take merge x frames (the number of frames "x" represents depends on the speedup factor and what kind of function is called - as said above, asymmetrical functions are also possible). Then move on by y frames (y is the speedup factor and always <x) and repeat.
I assume the only thing missing to achieve what describe in my first post is a helper script that calculates the weighting based on a given function and the desired speedup factor. I know you can just put variables (that get calculated and served by the helper script) into the "AverageFrames()" call but how to do you implement varying frame amount? Would you just add a very high amount of variables into the AverageFrames()" call, where the first and last variables are zeros (if the function works with less frames) or is there a more elegant way to do this?

To put it another way, I want to speed up the footage by a factor of y but use x amount of frames for each blend (where x>y), so the motion blur (trails) overlap from frame to frame.

I hope it became clear what I am trying to do, please bear with me and my limited abilities to explain what my goal is.
Simply add c.std.SelectEvery(clip, cycle=y, offsets=0) assuming you only want to keep 1 in y frames. You can pass any vector with up to 25 values to AverageFrames. There's no need to add zeroes at the ends.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote