Last active
October 20, 2017 23:12
-
-
Save rraallvv/ad1e2ae260bcb1a4d29132468298da9e to your computer and use it in GitHub Desktop.
video_stabilization.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| mkdir temp | |
| while read -d $'\0' file; do | |
| file=$(echo $file | sed -n 's/\.\/\(.*\)/\1/p') | |
| #echo $file | |
| #continue | |
| ffmpeg -i $file -y -nostdin -vf vidstabdetect=stepsize=6:shakiness=8:accuracy=9:result=transform_vectors.trf -f null - | |
| ffmpeg -i $file -y -nostdin -vf vidstabtransform=input=transform_vectors.trf:zoom=1:smoothing=30,unsharp=5:5:0.8:3:3:0.4 -vcodec libx264 -preset slow -tune film -crf 18 -acodec copy temp/$file | |
| done < <(find . -not -name ".*" -name "*.mp4" -type f -print0) | |
| rm transform_vectors.trf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment