How to stabilize a video from the CLI:

Install dependencies:

$ brew install ffmpeg --with-libvidstab
$ brew install vid.stab

Analyze video and save info to `transforms.crf`:

$ ffmpeg -i input.mp4 \
-vf \
vidstabdetect=result="transforms.crf":shakiness=10:accuracy=15 \
-f null -

Use the info to perform the stabilization:

$ ffmpeg -i input.mp4 \
-vf vidstabtransform=smoothing=30:input="transforms.crf" \
output.mp4

--
https://git.io/vQ0Aw
https://scottlinux.com/?p=6406

This script is for the worst-case scenario with a maximum `shakiness` of 10 out of 10.

Adjust parameters accordingly.