Log in

View Full Version : Need similar to Vdub's Tweaker only part of frame


TCmullet
15th October 2024, 01:49
I need a function similar to VirtualDub's Tweaker, which I used to use to copy a frame over the top of subsequent frames. Some weird combination of "loop" commands could do it probably.

However, my need is narrower. Let's say my video is 9 frames long, number 0 thru 8. I need to copy frame 1 on top of frames 2, 3 and 4, BUT ONLY lines 123 thru 129 of the frame.

Does anyone know of something that does this? I suppose I could settle for exactly what Tweaker does, but I really don't want to tamper with lines outside my range of 123-129. (The damage is within lines 123-129 on frames 2-4.)

EDIT: I supposed I should add that the REAL problem is several lines are radically shift sideways. So really, my desire is a way to manually shift just those lines in those frames. Maybe THAT exists already. But there ARE cases where I would need to not directly fix the particular lines but copy them from the prior frame.

Emulgator
15th October 2024, 07:45
HorizontalStripReplacer, horizontal shift not yet implemented:
LWLibavVideoSource("yourfilepathhere")
replacestripsourceframe=1
replacestripstartframe=2
replacestripendframe=4
replacestripstartline=123
replacestripendline=129
source422=ConvertToYUV422()
replacestrip=Crop(FreezeFrame(source422,0,framecount-1,replacestripsourceframe),0,replacestripstartline,0,1+replacestripendline-replacestripstartline)
Trim(source422,0,-1)++Trim(StackVertical(Crop(source422,0,0,0,replacestripstartline-1),replacestrip,Crop(source422,0,replacestripendline,0,0)),replacestripstartframe-1,replacestripendframe)++Trim(source422,replacestripendframe+1,0)
In the end I would calculate replacestrip from either manually shifted individual lines, or even better: motion-interpolated from the neighbored good frames.