How do you copy frames with VirtualDub or AviSynth? This would seem easy enough but after searching the Intertubes, and AviSynth Wiki, I can't find a solution.
+ Reply to Thread
Results 1 to 9 of 9
-
-
Basically I have a an AVI video and I want to copy specific sections to pad them out. So instead of cutting the video into many sections I just want to have let's say frames 100 - 110 copied 10 times each and 500 - 510 copied 50 times each. I know this will cause a sort of slow motion effect which is fine. Is this doable or should I be doing it a different way?
-
You should be able to do it in avisynth
Do you care about the audio? It will desync if you insert copied frames if you don't account for that
Do you want it appended to the other "normal" sections? So frames 0-99 would be the same as the original?
How do do you want "padded?" , do you mean section sequence 100-110 repeated 10 times ; or frame 100 repeated 10x, then 101 repeated 10x, etc...
A 10x frame repeat will give a slo mo effect, but very noticeably choppy. Other options would be to apply blurring or blend frames, or generate intermediate frames (frame interpoloation). It depends what you are trying to do and the "look" you are going for. Maybe you could describe in better detail exactly what you are trying to do? -
ok disclaimer; I just know the avisynth basics, so this might be a "clunky" way of doing it and there are probably cleaner ways to do this:
Code:a=AVISource("video.avi").Trim(0,99) b=AVISource("video.avi").Trim(100,110) c=AVISource("video.avi").Trim(111,200) d=Interleave(b,b,b,b,b,b,b,b,b,b) a++d++c
You may have to adjust the fps of the interleaved section, depending on what you want to do. (e.g. use AssumeFPS) -
You will have to adjust it, since Interleave changes the frame rate and you can't append sections with different rates. Also, a less 'clunky' way (especially for repeating say 50 times) would be:
Code:v=AVISource("video.avi") a=v.Trim(0,99) b=v.Trim(100,110) c=v.Trim(111,499) d=v.Trim(500,510) e=v.Trim(511,0) b2=b.ChangeFPS(v.FrameRate*10).AssumeFPS(v) d2=d.ChangeFPS(v.FrameRate*50).AssumeFPS(v) a++b2++c++d2+e
-
Can simplify the syntax a bit:
Code:AVISource("video.avi") Trim(0,99) ++\ Trim(100,110).ChangeFPS(FrameRate*10).AssumeFPS(FrameRate)++\ Trim(111,499) ++\ Trim(500,510).ChangeFPS(FrameRate*50).AssumeFPS(FrameRate)++\ Trim(511,0)
Last edited by AlanHK; 27th Jan 2010 at 11:34.
-
I was actually going to post about the frame rate error I was getting so I will try these new scripts and see what happens.
Similar Threads
-
Virtualdub VCR capture no dropped frames but 5400 inserted frames in 1 hour
By suloku in forum Capturing and VCRReplies: 12Last Post: 17th Aug 2011, 22:33 -
need help unblending previously blended frames rather than dropping frames
By BilboFett in forum Video ConversionReplies: 15Last Post: 12th May 2011, 21:15 -
mencoder: seeking to frames (or cropping start frames)
By manchurian_candidate in forum LinuxReplies: 3Last Post: 13th Dec 2010, 08:53 -
Cutting Mp4 between I-frames, replacing some frames
By eymerich in forum EditingReplies: 4Last Post: 29th Jul 2009, 08:41 -
inserted frames without dropped frames in VirtualDub capturing VHS
By whschlebaum in forum Capturing and VCRReplies: 0Last Post: 23rd Aug 2007, 20:59