How do i generate Webp preview animations using FFMPEG

1

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 that 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?

Update

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

SHM

Posted 2019-02-21T10:42:59.413

Reputation: 111

Is this issue resolved for you? – Hassaan – 2019-09-23T19:38:20.700

Answers

3

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.

nico_lab

Posted 2019-02-21T10:42:59.413

Reputation: 402