This script takes a stabilized layer, precomposes it, then adds expressions
that counter the effects of the original stabilization.
If you are trying to Motion Track an element on to some moving footage,
it is often easier to stabilize that footage first. You can then easily line up
the 'element to be tracked on' over the stabilized footage before applying
the inverse of that stabilization to reintroduce the footage's original
Here's how you do it:
1. Drop your movie footage into a comp and choose Animation > Stabilize
Motion from the main menu.
2. Stabilize the footage. You can choose to stabilize Position, Rotation and
Scale. When finished, hit Apply in the Tracker Controls and check the
results of the stabilization.
3. With the stabilized layer selected, run the DestabilizeLayer script. You
will now have two comps, one ending with (stab) and one with (destab).
4. Open the (stab) comp and place a still element or solid over the stabilized
5. Finally, in the (destab) comp, you will see this element is now perfectly
(hopefully) tracked on to the movie footage.