ffmpeg: Convert video file to separate WebP images

I think this does what you want:

ffmpeg -i YOURINPUT -codec libwebp frame-%03d.webp

You can get a list of all coders that relate to WEBP (along with the key to the symbols at the top) like this:

ffmpeg -v warning -codecs | grep -Ei "=|webp"

 D..... = Decoding supported
 .E.... = Encoding supported
 ..V... = Video codec
 ..A... = Audio codec
 ..S... = Subtitle codec
 ..D... = Data codec
 ..T... = Attachment codec
 ...I.. = Intra frame-only codec
 ....L. = Lossy compression
 .....S = Lossless compression

 DEVILS webp                 WebP (encoders: libwebp_anim libwebp)

That tells you that there are two encoders, namely libwebp_anim and libwebp, so that’s how I decided to use libwebp because it doesn’t do animation, unlike libwebp_anim.

Once you know the encoder you want to use, you can find the options it supports like this:

ffmpeg -v warning -h encoder=libwebp  
   
Encoder libwebp [libwebp WebP image]:
    General capabilities: dr1 
    Threading capabilities: none
    Supported pixel formats: bgra yuv420p yuva420p
libwebp encoder AVOptions:
  -lossless                  E..V....... Use lossless mode (from 0 to 1) (default 0)
  -preset                    E..V....... Configuration preset (from -1 to 5) (default none)
     none            -1           E..V....... do not use a preset
     default         0            E..V....... default preset
     picture         1            E..V....... digital picture, like portrait, inner shot
     photo           2            E..V....... outdoor photograph, with natural lighting
     drawing         3            E..V....... hand or line drawing, with high-contrast details
     icon            4            E..V....... small-sized colorful images
     text            5            E..V....... text-like
  -cr_threshold              E..V....... Conditional replenishment threshold (from 0 to INT_MAX) (default 0)
  -cr_size                   E..V....... Conditional replenishment block size (from 0 to 256) (default 16)
  -quality                 E..V....... Quality (from 0 to 100) (default 75)

Read more here: Source link