gpt-4.1-mini-2025-04-14· OpenAI
WildChat-4.8M (AI2)
Scale gif down 10% in ffmpeg
- User
Scale gif down 10% in ffmpeg
- Assistant
To scale down a GIF by 10% in ffmpeg (i.e., to 90% of its original size), you can use the
scalefilter with an expression that calculates 90% of the input width and height.Here’s an example command:
bashffmpeg -i input.gif -vf "scale=iw*0.9:ih*0.9" output.gifExplanation:
-i input.gif: specifies the input file-vf "scale=iw*0.9:ih*0.9": scales width (iw) and height (ih) to 90% (0.9) of original sizeoutput.gif: is the scaled output
Note on GIF Quality and Palette
Scaling GIFs directly can sometimes reduce quality or increase file size unoptimized. For better quality, you might want to generate a palette first and then use it during palette-based scaling:
bashffmpeg -i input.gif -vf "palettegen" palette.png ffmpeg -i input.gif -i palette.png -filter_complex "scale=iw*0.9:ih*0.9 [scaled]; [scaled][1:v] paletteuse" output.gif