So i have been generating preview animations in GIF formats using FFMPEG. (basically selecting a few seconds of the whole video and storing as gif)

however the previews that youtube generates in webp format seem way more smaller in size than what i have achieved.

Here is the command i use to generate a 3 second preview in webp format:

ffmpeg -i d:\1.mp4 -lossless 0 -ss 00:00:00 -t 00:00:03 -s 320x180 1.webp

But this is still larger than equivalent gif.

Any tips on how to reduce the output webp animation?


even with max compression and min quality ffmpeg it still produces much larger webp outputs than what gif2web gives.

  • Is this issue resolved for you?
    – Hassaan
    Sep 23 '19 at 19:38

decrease quality http://ffmpeg.org/ffmpeg-codecs.html#libwebp

-qscale float
For lossy encoding, this controls image quality, 0 to 100. 
For lossless encoding, this controls the effort and time 
spent at compressing more. The default value is 75. 
Note that for usage via libavcodec, this option is called 
global_quality and must be multiplied by FF_QP2LAMBDA.
  • Please use -q:a or -q:v, -qscale is ambiguous
    – Matt
    Jan 7 '21 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.