Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

ffmpeg GIF Maker Command (2023 Edition)

This is the starting point. Need to pull in all the different notes on the different formats and probably just make different ones in general for optional output?

bash
#!/bin/bash
INPUT_PATH="/Users/alan/Videos/yo/ezgif.com-crop-video.mp4"
OUTPUT_PATH="/Users/alan/Desktop/output.gif"
WIDTH=300
FPS=10
COLORS=190
CROP="crop=in_w:in_h:0:0,"
START="-ss 0.7"
TIME="-t 2"
# TIME="-t 10"
# TIME=""

ffmpeg -loglevel panic -hide_banner -i "${INPUT_PATH}" $START $TIME \
       -vf "${CROP}fps=${FPS},scale=${WIDTH}:-2:flags=lanczos,split[s0][s1];\
      [s0]palettegen=max_colors=${COLORS}:reserve_transparent=0[p];\
      [s1][p]paletteuse=dither=sierra2" \
       -y "${OUTPUT_PATH}"

open $OUTPUT_PATH
results start