In this tutorial you learn how to stabilize a shaky shot with the Mocha tracker and the MochaImport script. After stabilization, you usually need to zoom in a bit to get rid of empty areas that show up at the borders of the image. Instead of this, we use a clever technique to fill the missing parts at the borders such that there is no need for zooming any more. The technique uses frames before and after the current frame to fill in parts of the image that are missing in the current frame. Sounds complicated but works very well and is done with a few clicks using MochaImport.
Things to learn in this After Effects tutorial:
- Learn how to track in Mocha (I use Mocha Pro, but it also works with any other variant)
- Learn how to stabilize a shot with the MochaImport script.
- Learn how to smooth the camera movement with a simple expression.
- Learn how to fill in missing parts at the borders of the stabilized footage by inserting appropriate material from the frames before and after the current point in time.
- Tracking the shot in Mocha (1:46-5:44)
- Stabilizing the shot (5:45:55-11:25)
- Fill in missing parts at the borders (11:26-21:01)
Expression for Smoothing the Camera Movement
smooth(width = 1, samples=5, t=time)The smoothness can be controlled by the value for "width". To get an even more smooth movement make this value larger, to make it less smooth make it smaller (e.g. "width=0.5"). "width=1" means that the values over the duration of one second are smoothed (i.e. averaged).
- Ultra-Smooth Pans with Mocha and AE shows how to smooth the motion using iExpressions instead of normal expressions.
After Effects Project Download
tut-mocha-stabilize.zip (7,03 MB)