I am using Powerpoint to create animations which I then export into a video and crop and convert to GIF using ffmpeg.
Here is the (cropped) MP4 video, and this is the GIF I was able to produce:
To my (untrained) eye, it appears rather grainy, and not terribly smooth. I am wondering if there are options in ffmpeg I can be using thaat will give me a better quality GIF.
Here is the command I am using to crop:
ffmpeg -i in\vlans-3vlans-tag-untag.mp4 -filter:v "crop=1262:423:91:154" in\cropped_vlans-3vlans-tag-untag.mp4
Here are the two commands I am using to convert:
ffmpeg -y -vf fps=35,scale=896:-1:flags=lanczos,palettegen out\PALETTE.png -i in\cropped_vlans-3vlans-tag-untag.mp4 ffmpeg -y -filter_complex "fps=35,scale=896:-1:flags=lanczos[x];[x][1:v]paletteuse" -i in\cropped_vlans-3vlans-tag-untag.mp4 -i out\PALETTE.png out\vlans-3vlans-tag-untag.gif
I should say, I am not particularly talented with ffmpeg, I mostly put these commands together from googling and other posts on this site. So if any of the arguments I am using are making the conversion worse, I'd also be interested in hearing about it.
I tried the
-b 2048k option, and I couldn't tell a difference in quality. In fact, when I ran a SHA256 hash on the output file with and without this option, the result was identical.