datamosh ffmpeg alias

This commit is contained in:
xfnw 2022-05-29 14:04:02 -04:00
parent 772347b52f
commit 2cf8581662
1 changed files with 1 additions and 0 deletions

1
.zshrc
View File

@ -15,6 +15,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"}
datamosh() { ffmpeg -i "$1" -c copy -bsf:v noise=drop='gt(pts/tb\,30)*key' "$2" }
base58gen() { echo $(base64 /dev/urandom | tr -d "\n/+Il0O$2" | head -c ${$(($1/5.*8+1))%.*}) }