Skip to content

Instantly share code, notes, and snippets.

@dangerousbeans
Created January 17, 2016 21:51
Show Gist options
  • Save dangerousbeans/93f8e16252ca5166a541 to your computer and use it in GitHub Desktop.
Save dangerousbeans/93f8e16252ca5166a541 to your computer and use it in GitHub Desktop.
ffmpeg Video Stabilization with Vid.Stab
# For all .MP4 files, generate matching video stabalization files, ending .trf
find . -name "*.MP4" -print0 | xargs -0 -I filename ffmpeg -i filename -vf vidstabdetect=shakiness=10:accuracy=15:result="filename.trf" -f null -
# For all pairs of MP4 and .trf files, transform and output matching video
find . -name "*.MP4" -print0 | xargs -0 -I filename ffmpeg -i filename -vf vidstabtransform=input="filename.trf" -qscale 1 filename.stabilisted.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment