vStab

KLT Video Stabilizer

Video stabilizer for CCD and CMOS cameras based on the Kanade-Lucas-Tomasi feature tracker.

Characteristics and limitations

Usage examples

Sony PSP as the video source

The included Blender Avilib can read and write PSP-compatible video files directly, however since the GO!CAM employs a CMOS sensor it is necessary to specify a shutter angle on the command line. Acoording of my tests PSP's GO!CAM always uses the full 180 degrees regardless on the quality setting, so:

./stab -r 180 <input>.AVI <output>.avi

Will hopefully give the expected result.

Analog video as the video source

Acquire from the capture card with ffmpeg and a command line like:

ffmpeg \

-y -sws_flags lanczos -deinterlace \

-f video4linux2 -s 768x576 -r 25 -i /dev/video0 \

-f alsa -ar 44100 -ac 2 -i default \

-croptop 4 -cropbottom 4 -cropleft 4 -cropright 4 \

-s 640x352 -vcodec mjpeg -qmax 1 \

-acodec pcm_s16le \

capture.avi

And then process with:

./stab capture.avi <output>.avi

Links

Project page