[FFmpeg-user] Couple of questions about GIFs

Micael Silva micaelsilva at gmail.com
Sun Dec 20 21:28:20 EET 2020



On 20 Dec 2020, at 16:18, MediaMouth <communque at gmail.com> wrote:

Thanks to the recent FFmpeg notes on creating GIFs.
I was unaware GIFs could handle transparency at all until then.

Couple of additional questions:

1 - Am I understanding this correctly:
A single pixel of a GIF can either be 100% opaque or 100% transparent, no partial transparencies like you can achieve in PNG files, correct?

2 - My experience with GIFs is there is little (or no?) ability to control the quality vs file size tradeoffs.
i.e. If you want a high res GIF, you necessarily will have a large file size
(In contrast to, say, JPGs or MP4s where you can achieve high quality picture at surprisingly small file sizes)
Is this just the limitation of the GIF format, or is there some compression or other wizardry that can be done with, say FFmpeg, to get higher quality GIFs without ballooning the file size?)

===========

1) Yes

2) GIF it’s a quite old since limited format. If I remember correctly GIF is limited to a maximum of 256 colors in a pallet. You can use some tricks like dithering to improve the quality and smooth the appearance but there is so much you can do to keep the file small. That’s why on the web nowadays much that you read GIF is in fact a MP4 file without sound.


More information about the ffmpeg-user mailing list