From 772347b52f9e02bfec229adc866dd8be8011bfc9 Mon Sep 17 00:00:00 2001 From: xfnw Date: Sun, 29 May 2022 13:57:56 -0400 Subject: [PATCH] deshake ffmpeg alias --- .zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.zshrc b/.zshrc index 2663664..f3da962 100644 --- a/.zshrc +++ b/.zshrc @@ -14,6 +14,7 @@ smoothplot() { gnuplot -p -e 'set object rectangle from screen 0,0 to screen 1,1 calcpi() { echo "scale=$1; 16*a(1/5)-4*a(1/239)" | bc -l ; } vhsify() { ffmpeg -i "$1" -vf fps=24,scale="(iw*sar)*max(640/(iw*sar)\,480/ih):ih*max(640/(iw*sar)\,480/ih)",crop=640:480,setsar=1:1,convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2",curves="0/0 0.5/0.58 1/1",rgbashift=rh=-1:gh=1 -preset veryfast -c:a copy "$2" } +deshake() { ffmpeg -i "$1" -vf "format=rgb24,split[a][b];[a]deshake=rx=64:ry=64:edge=0,colorkey=0x008000:blend=0:similarity=.2[a];[b]drawbox=color=black:t=fill[b];[b][a]overlay" -c:a copy "$2" "$3" "$4"} base58gen() { echo $(base64 /dev/urandom | tr -d "\n/+Il0O$2" | head -c ${$(($1/5.*8+1))%.*}) }