I am generating gifs using ffmpeg, in its latest version (at the time of this question), using the following lines of code:
ffmpeg -y 10 -i in.mp4 -vf fps=10,scale=-1:340:flags=lanczos,palettegen palette.png
to generate a palette, and
ffmpeg -y 10 -i palette.png -fs 8000000 -filter_complex 'fps=10,scale=-1:340:flags=lanczos[x];[x][1:v]paletteuse=dither=bayer:bayer_scale=5' out.gif
to generate the gif. Everything works fine, only I wanted to decrease the size (it is 640px wide) because the gif is always presented at most with 120px width. How do I specify the size? I tried putting -s alturaXlargura
but it gives error.