PDA

View Full Version : How to extract a moving sub-area?


whugemann
20th August 2007, 19:59
I would like to extract a moving sub-area from an AVI in order to trace a moving object more closely, i.e. I would like to make a Crop with the x-coordiante depending on the frame number.

My first idea was to do something with a combination of ScriptClip and Crop, i.e.

ScriptClip(Video,Crop(Video, current_frame * 5, 50, 200, 300))

but this doesn't work, because Crop returns a complete video.

Any ideas how to approach this problem?

gzarkadas
20th August 2007, 23:55
Basically what you need - with an appropriate runtime script - is to move your entire video on a blank one (with Overlay) such that the area in question is always on its center. Then you just Crop the video returned by ScriptClip.

This thread (http://forum.doom9.org/showthread.php?t=124464) will be of help; it adresses a similar problem, thus the posted code with some tweaking will most probably suit your needs.