use ffmpeg to convert video to high quality gif with start and end point

PHOTO EMBED

Mon Mar 15 2021 13:38:05 GMT+0000 (Coordinated Universal Time)

Saved by @nour #bash

ffmpeg -ss 6.0 -t 70.0 -i /path/to/file.mp4 -filter_complex "[0:v] fps=12,scale=w=640:h=-1,setpts=0.5*PTS,split [a][b];[a] palettegen [p];[b][p] paletteuse" /path/to/output.gif
content_copyCOPY

found this on the giphy engineering blog, hasn't let me down

https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/