From 8d9058a5636fffc17dad73be23b6d9708f90d89f Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 16 Dec 2019 12:48:51 +0100 Subject: [PATCH] add stabilise --- mybashrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mybashrc b/mybashrc index 2192f31..ef7bc29 100644 --- a/mybashrc +++ b/mybashrc @@ -701,6 +701,16 @@ _CLEAN_PPA() { rm -f /etc/apt/sources.list.d/{jonathonf-ubuntu-backports*,jonathonf-ubuntu-ffmpeg-4*} } +_STABILISE_VIDEO() { + +for i in $PWD/*.MP4; do + echo "Processing vid $i ...${i%.*}" + ffmpeg -i "$i" -vf vidstabdetect=stepsize=6:shakiness=4:accuracy=15:result=/tmp/transform_vectors.trf -f null - + ffmpeg -i "$i" -vf vidstabtransform=input=/tmp/transform_vectors.trf:zoom=2:smoothing=10,unsharp=5:5:0.8:3:3:0.4 -c:v libx265 -crf 28 -c:a aac -b:a 128k "${i%.*}-stable.mp4" + rm /tmp/transform_vectors.trf +done +} + # enable color support of ls and also add handy aliases # some more ls aliases #alias wp='/usr/bin/wp --allow-root'