[ADDON] High quality video stabilization


If you try to stabilize a shaky video using Blender´s Tracker, you will encounter a problem:

Every camera motion will be compensated, even pans and other ones you want to preserve.
A high quality deshaker like the well-known VirtualDub plugin goes a different way: It tries to compensate only the shaky, annoying movement while retaining any wanted motion.


To achieve this in the Blender-Tracker I have written a simple addon: It applies a very simple highpass filter to a selected tracking marker in the scene´s frame range. The newly created Marker will only contain the quick, shaky movements. Then simply use that marker for stabilization and you should get good results!

Of cause you may also smooth two or more markers to stabilize rotation, too.
Just remember to ensure that the selected marker has keyframes/tracking data in the whole scene frame range. Otherwise the script will fail.

You will find the Addon in the Movie Clip Editor’s tools panel.

Here is a short article about the usage:

Have Fun!


Highpass_0_1.zip (1.68 KB)

Well, the Addon name was wrong; Fixed and reuploaded :slight_smile:

Sunboy, will get down to testing asap :slight_smile:

Just a quick note: the value assigned to the “name” key in the dict declaration is set to “SunTools”
Don’t have any problem with it except that it makes it real hard to find the script once you install it as the name coincides with the name of your newest VSE script.

gee, you beat me by five mins! :wink:

Hey Sunboy, I’ve been testing your stabilization addon.

I’ve used a recent vacation video and tracked two points, one for location and the other for rotation. The video on the left uses the standard Blender stabilization tools while the video on the right uses your addon with the default values:

I’m not sure what the default value of 5 really means (in absolute or relative terms), and for what kind of footage it is recommended. I think that it works best if I stabilize location only, stabilizing rotation makes it look kinda funny.

Will pursue further testing.

Thank you for testing; the value determines over how many frames the motion is averaged in the smoothing process. In fact you have to play with the value to get optimal results - so it could be considered as some relative value without an important identity.

I have made a short test, too and rotation stabilization worked quite well for me? Of cause there is some wobbliness in the stabilized footage, but this is from the rolling shutter of the camera - I guess that Blender cannot do anything to correct that yet.

So how does your addon compare to this C code modification that is under review?

Thanks : )

I hope that the Patch will get into trunk because it is a very annoying fact that blending multiple consecutive markers over time for 2d stabilization is not possible currently. This will help very much.

The last part of the wiki documentation regarding the expected target position describes a manual way to do what my addon tries to do automatically. Maybe it would be a good Idea to add an automatic mode to the expected target position feature which uses the inverted value of the temporally smoothed tracking data as input?

@sunboy: new tests with other clips result in much better 2D stabilizations compared to the standard tracking settings :slight_smile:

This is great, downloading now! Extremely useful, especially with GoPro footage being so common nowadays.


Hi ! Just a few words to say thank you ! Great addon ! I’ll use it a lot !

Great addon! This should be included with Blender by default soon, I say! Nice work!

Nice little script ! Does it’s job well, even if it is not for heavily unstabilized footage.

Calibration-free rolling shutter removal has been discussed by the guys at YouTube as part of their stabilization algorithm (which does a good job by the way, and has the advantage to be free :wink: )

Paper is here: http://www.cc.gatech.edu/cpl/projects/rollingshutter/

That is very interesting, cool! :slight_smile:

sry but how do you save out the cleared footage??

Simply add the Clip to the sequencer timeline via Add -> Clip and activate the 2d stabilization in the properties.
From then on it is simple sequencer rendering found in many tutorials and in the Blender Wiki.

sunboy, how is your conversation with Ichthyostega going? Have you guys figured out how to collaborate or will your work continue to be separate? We talk about the need for this improvement a lot a the SoCal Blender Meetup groups.

It would be great if you guys keep the momentum going and get this into Blender. Either Ichthyostega’s code patch or you get your addon in to the official release addons.

Let’s keep this train rolling so it makes its destination at the Blender release station! ; )

Most probably there won’t be a merge of our work because we do simply follow very different ways. My intention is to create a very simple and automatic smoothing while whereas he is providing a more manual way.

Yet, this is not reallya bad thing because the main issue of the whole stabilization process in blender is that you cannot use markers for stabilization consecutively. If a marker used for stabilization leaves the frame, you cannot let an other marker overtake the job seamlessly.
This issue is adressed by Ichthyostega and my addon will benefit from that, too!

By the way, the algorithm used by my addon is so simple that there is no sharing of work needed because one may implement something analog within five minutes or so :wink:

I will at least make proper wiki entries for my addons, but getting them into trunk is not so easy because the blender release is meant to contain addons that are used by many people and my ones represent more of a niche.

Well the niche that your addon is popular with is growing. Blender is being used more and more in VFX, TV, motion graphics and compositing in general. I will keep putting the word out myself for sure.

Are there any improvements or added features you still want to put into your addon?

Hi, I have this error, when I click Apply. What is it?I am working on 64bit Debian 7 Linux, Blender 2.72b.