Since availability of Ubuntu Xenial 16.04, this procedure is obsolete and is not updated.
Please use Ubuntu 16.04 - Rotate & Stabilize your video with MLT and Vid.stab instead.
Nowadays, street video shooting is becoming a reality.
Who is not having a smartphone, a point-and-shoot camera with video capabilities or even a HD camcorder ?
These devices are affordable, light-weight, very compact and easy to use. Whatever happens around you, you are able to record it on the spot. But, on the other end, as these devices are compact and light, they are not very steady. Your recordings tend to be shaky !
Till date, there was no simple solutions under Linux to stabilize (unshake) videos. One of the first one I used was transcode with vid.stab plugin. This stabilization plugin is very efficient. But the transcode tool is giving lots of trouble as soon as you want to encode your resulting video to h264. In fact, the interface between transcode and ffmpeg is type of 'broken'.
Short time back, the MLT framework has integrated a port of vid.stab stabilization plugin. That is a very good news as MLT framework provides a command-line tool melt which interfaces very well with FFmpeg libraries for h264 encoding.
This article will explain how to easily post-process any video file to stabilize (unshake) it. It will use :
- latest version of MELT, a command-line tool from MLT framework, which comes now with vid.stab stabilization filter
- latest version of FFmpeg to re-encode the resulting video with h264 codec and aac audio
It will explain 2 different approaches :
- stabilization thru command-line
- stabilization directly from Nautilus, thru a Nautilus script