Add a script for generating square gifs from videos (assumes 1920x1080 source)

This commit is contained in:
mmcwilliams 2019-04-04 00:53:55 -04:00
parent e8c949daea
commit 3fa0d6a14b
1 changed files with 10 additions and 0 deletions

10
scripts/square_gif.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
TMP_FILE=$(mktemp)
echo "Generating square gif of ${1} as ${2}x${2}"
ffmpeg -i "$1" -c:v prores_ks -profile:v 3 -filter:v "crop=1080:1080:420:0" $TMP_FILE
ffmpeg -i $TMP_FILE -f gif -vf scale=$2:$2 "square_${2}.gif"
echo "Generated square_${2}.gif"