I'm trying to extract a GIF from an MP4 video file.
Now I have two modi with which I do this:
1) the regular one:
ffmpeg -t 7.7 -ss 00:22:53 -i video.mp4 -i palette.png -s 320x174 -filter_complex "fps=15" output.gif
which gives out a file, 1.6MB of size.
and 2)
ffmpeg -t 7.7 -ss 00:22:53 -i video.mp4 -i palette.png -filter_complex "fps=15,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
which gives out a way better looking, but 4.5MB (181% increase) big file. It uses a 16x16 palette file, which I created with
ffmpeg -y -t 7.7 -ss 00:22:53 -i video.mp4 -vf fps=15,scale=320:-1:flags=lanczos,palettegen palette.png
Now I can't quite see how 2 GIFs of the same fps, duration and resolution can have such a huge difference in size. My intuition would be, they should be the same. Why is there this difference? And is there any way to cut the size of 2) to the one of 1) without losing quality?
Thanks