D9JK
16th June 2010, 21:32
Hello all,
I just recently started learning how to use Avisynth, and here's something I'm currently trying to figure out:
If the code (not written by me, by the way) for motion smoothing / frame interpolation is this...
LoadPlugin("C:\Program Files\AVISynth\Plugins\mvtools.dll")
source = DirectShowSource ("1.mov")
oSource = source
source = AssumeFPS (source,20)
backward_vec = source.MVAnalyse (isb = true, truemotion=true, pel=2, idx=1)
forward_vec = source.MVAnalyse (isb = false, truemotion=true, pel=2, idx=1)
cropped = source.crop (4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse (isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse (isb = false, truemotion=true, pel=2, idx=2)
fSource = source.MVFlowFps2 (backward_vec,forward_vec,backward_vec2,forward_vec2,num=60,idx=1,idx2=2)
fSource = AssumeFPS (fSource,60)
return fSource
... and the code for stitching multiple video clips together is something like this (if I'm not mistaken)...
DirectShowSource("1.mov")
d1=last
DirectShowSource("2.mov")
d2=last
DirectShowSource("3.mov")
d3=last
d1++d2++d3
... then how would I combine the two?
In other words, I'm trying to make Avisynth first motion smooth / frame interpolate all video clips, and then stitch them together into a single, long clip.
I already tried something with my (very) limited knowledge, but the results are not really worth mentioning. But I assume I might have to change things like "source" and "fsource" (and "cropped"?) into "source1 and "fsource1" for each clip, so that they don't interfere with each other, when processing the next clips, right? Or maybe not, you tell me.
It's the block of code required by the frame interpolation process that is confusing me, but this is probably a cakewalk for the Avisynth veterans.
I just recently started learning how to use Avisynth, and here's something I'm currently trying to figure out:
If the code (not written by me, by the way) for motion smoothing / frame interpolation is this...
LoadPlugin("C:\Program Files\AVISynth\Plugins\mvtools.dll")
source = DirectShowSource ("1.mov")
oSource = source
source = AssumeFPS (source,20)
backward_vec = source.MVAnalyse (isb = true, truemotion=true, pel=2, idx=1)
forward_vec = source.MVAnalyse (isb = false, truemotion=true, pel=2, idx=1)
cropped = source.crop (4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse (isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse (isb = false, truemotion=true, pel=2, idx=2)
fSource = source.MVFlowFps2 (backward_vec,forward_vec,backward_vec2,forward_vec2,num=60,idx=1,idx2=2)
fSource = AssumeFPS (fSource,60)
return fSource
... and the code for stitching multiple video clips together is something like this (if I'm not mistaken)...
DirectShowSource("1.mov")
d1=last
DirectShowSource("2.mov")
d2=last
DirectShowSource("3.mov")
d3=last
d1++d2++d3
... then how would I combine the two?
In other words, I'm trying to make Avisynth first motion smooth / frame interpolate all video clips, and then stitch them together into a single, long clip.
I already tried something with my (very) limited knowledge, but the results are not really worth mentioning. But I assume I might have to change things like "source" and "fsource" (and "cropped"?) into "source1 and "fsource1" for each clip, so that they don't interfere with each other, when processing the next clips, right? Or maybe not, you tell me.
It's the block of code required by the frame interpolation process that is confusing me, but this is probably a cakewalk for the Avisynth veterans.