From 2b2b98eb0176b53f98a297b3564d77bcf8b8d805 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Fri, 31 May 2019 14:58:30 -0400 Subject: [PATCH] Script for generating square gifs from videos --- scripts/square_gif.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/square_gif.sh b/scripts/square_gif.sh index d8beb35..ec44554 100644 --- a/scripts/square_gif.sh +++ b/scripts/square_gif.sh @@ -5,9 +5,9 @@ TMP_GIF=$(mktemp) TMP_PALETTE=$(mktemp) echo "Generating square gif of ${1} as ${2}x${2}" -ffmpeg -y -i "$1" -c:v prores_ks -profile:v 3 -filter:v "crop=1080:1080:420:0" "$TMP_CROP.mov" -ffmpeg -y -i "$TMP_CROP.mov" -c:v prores_ks -profile:v 3 -vf scale=$2:$2 "$TMP_GIF.mov" -ffmpeg -y -i "$TMP_GIF.mov" -vf palettegen "$TMP_PALETTE.png" -ffmpeg -y -i "$TMP_GIF.mov" -i "$TMP_PALETTE.png" -filter_complex paletteuse -f gif "square_${2}.gif" +ffmpeg -y -i "$1" -c:v prores_ks -profile:v 3 -filter:v "crop=w:w:420:0" "$TMP_CROP.mov" +#ffmpeg -y -i "$TMP_CROP.mov" -c:v prores_ks -profile:v 3 -vf scale=$2:$2 "$TMP_GIF.mov" +#ffmpeg -y -i "$TMP_GIF.mov" -vf palettegen "$TMP_PALETTE.png" +#ffmpeg -y -i "$TMP_GIF.mov" -i "$TMP_PALETTE.png" -filter_complex paletteuse -f gif "square_${2}.gif" -echo "Generated square_${2}.gif" \ No newline at end of file +echo "Generated square_${2}.gif"