ffmpeg -r 90 -i %03d.png -c:v libx264 -s 1920x1080 -r 40 -pix_fmt yuv420p add-output-file-name-here.mp4 ffmpeg -ss 30 -t 3 -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif