Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
Here's an example video I made
brew install ffmpeg --with-libvidstab
This won't modify your video or create a new video, but it should create a new file called transform.trf
ffmpeg -i clip.mov -vf vidstabdetect -f null -
ffmpeg -i clip.mov -vf vidstabtransform=smoothing=5:input="transforms.trf" clip-stabilized.mov
This should create a new stabilized video called clip-stabilized.mov
Found on a forum here
ffmpeg -i Clip8.mov -i Clip8-vidstab.mov -filter_complex "[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w" merged.mov
Edits from 2021. There's some errors/inefficiencies above due to changes since it was written (in Dec 2015).
Here's the rewritten 2021-era guide
On Mac OS, install ffmpeg and vidstab from homebrew:
Run stabilization in two passes
There are plenty of options for libvidstab, like
shakiness
,accuracy
,smoothing
. The defaults are good, but you may want to experiment. There's even a visual diagnostic mode.You now have a
clip-stabilized.mkv
!Bonus: create a comparison video
Use the
vstack
orhstack
filter, depending on if you want them stacked vertically or side-by-side:And here's a two-liner that does everything (because repeating these filenames gets annoying)