Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Moving Crop, how do crop which move across frames
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
xcdb
Posted: Dec 20 2011, 06:58 PM


Newbie


Group: Members
Posts: 2
Member No.: 33855
Joined: 20-December 11



Hi,
anybody knows how crop video, where the cropping area is the same size in time, but their position is changing in time?

e.g.
I have big frames sorted to timelapse video(3800x2500), and I wish to crop the video to 1920x1080. but for 1st frame I will set cropping 0px before the picture, and for last frame I will set cropping 1880px before picture (in X axis). So, the final croped area move on the source video..

Sure, I can use some comercial video editor, but I not prefer this way..

any idea? maybe is there some filter for this effect..

thanx
rosi
 
     Top
IanB
Posted: Dec 20 2011, 09:29 PM


Avisynth Team Member


Group: Members
Posts: 121
Member No.: 22295
Joined: 23-October 07



Using Avisynth you could use the Animate filter.
CODE
....source

ConvertToYV24() # Format that can crop by 1 pixel.

Fc=Framecount()

Animate(0, Fc, "Crop",  0,1920,0,1080,  1880,1920,0,1080)

ConverttoYV12()

As Crop() cannot crop more finely than the chroma subsampling, you will need to first convert to a format that does not subsample the chroma, like RGB or YV24 (in 2.6 only).

And as Crop() only support integer crop values you will get unit stepping of the crop value depending how FrameCount relates to your 1880 value. If this is a problem you may use a resizer as a subpixel shifter.

To simplify parameter handling we will use a user function with Animate, i.e. :-
CODE
....source

Fc=Framecount()

Animate(0, Fc, "MoveIt", 0.0, 1880.0)

Function MoveIt(C Clip, M Float) {
 Return C.Spline16Resize(1920, 1080, M, 1920, 0, 1080)
}

 
     Top
xcdb
Posted: Dec 21 2011, 09:33 PM


Newbie


Group: Members
Posts: 2
Member No.: 33855
Joined: 20-December 11



thank you for your answer.
I try integer crop, then maybe comes other questions from me :-)
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
2 replies since Dec 20 2011, 06:58 PM Track this topic | Email this topic | Print this topic

<< Back to VirtualDub Filters and Filter Development