High quality GIF with FFmpeg

Created on 2022-10-03T21:56:55-05:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

#!/bin/sh

palette="/tmp/palette.png"
filters="fps=15,scale=320:-1:flags=lanczos"

ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2