Restore square_gif script with automatic resizing in the first script. Performs the crop and re-encode in 1920x1080

This commit is contained in:
mmcwilliams 2019-05-31 16:35:09 -04:00
parent a501023f27
commit 4e27edcfa9
1 changed files with 4 additions and 4 deletions

View File

@ -5,9 +5,9 @@ TMP_GIF=$(mktemp)
TMP_PALETTE=$(mktemp) TMP_PALETTE=$(mktemp)
echo "Generating square gif of ${1} as ${2}x${2}" echo "Generating square gif of ${1} as ${2}x${2}"
ffmpeg -y -i "$1" -c:v prores_ks -profile:v 3 -filter:v "crop=w:w:420:0" "$TMP_CROP.mov" ffmpeg -y -i "$1" -c:v prores_ks -profile:v 3 -filter:v "scale=1920:1080:force_original_aspect_ratio=decrease,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_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" -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 "$TMP_GIF.mov" -i "$TMP_PALETTE.png" -filter_complex paletteuse -f gif "square_${2}.gif"
echo "Generated square_${2}.gif" echo "Generated square_${2}.gif"