Skip to main content
Photo of DeepakNess DeepakNess

Using FFmpeg to stabilize videos

Unproofread notes

I posted this on Mastodon to which Chris replied that he uses ffmpeg to stabilize videos, and I was super impressed.

He also shared the commands and other info about stabilizing videos which I will be noting down below:

Here's a gist that contains information about how to install and use the setup.

  1. Run the below command to create a transforms.trf file
    ffmpeg -i input.mp4 -vf vidstabdetect=shakiness=7 -f null -
  2. Stabilize the video
    ffmpeg -i input.mp4 -vf vidstabtransform=smoothing=30:zoom=5:input="transforms.trf" stabilized.mp4

This seems very useful and helpful.

Comment via email