Anybody know of a filter that can be used to keep an element within a video clip centered (or stationary)? I realize I could do this manually with pan and crop, but I was just wondering if there were something automatic. Perhaps there's something for virtualdub?
If you read my instructions for using the Deshaker plugin for VirtualDub (it's over at VASST), at the end I hinted at the end of that as to how you might be able to use this to do what you want. Deshaker is normally used to stabilize an image that was filmed handheld. However, the author once told me that if you set the motion settings to -1, then the software will not let the image move at all. Thus, if you have something moving within a still frame, this would force that thing to stay there. The idea proposed by the author, which I never explored, was to do the first pass in Deshaker, using these settings, which would then create a LOG file. This file contains the movements for each frame that Deshaker normally uses in the second pass. However, in this mode, the numbers in that file can be thought of as keyframe instructions necessary to track the object of interest.
Oh, one other thing and that is you need to use the simple rectangular mask feature in Deshaker to help focus on the object you are interested in tracking.
Like I say, I never tried it, but if it worked it might work very well, since the Deshaker software does an amazing job of tracking motion.