Converting MP4 to GIF with ffmpeg

I was able to convert MP4 to GIF with ffmpeg with the following commands on Ubuntu 22.04:

ffmpeg \
  -i iphone884.mp4 \
  -r 15 \
  -vf "scale=512:-1,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \
  -ss 00:00:03 -to 00:00:06 \
  iphone884.gif

ffmpeg \
  -i iphone884.mp4 \
  -r 15 \
  -vf "scale=300:-1,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \
  iphone884.gif

1 Response to Converting MP4 to GIF with ffmpeg

Leave a Reply

Your email address will not be published. Required fields are marked *