1IMG2WEBP(1) General Commands Manual IMG2WEBP(1)
2
3
4
6 img2webp - create animated WebP file from a sequence of input images.
7
9 img2webp [file_options] [[frame_options] frame_file]... [-o webp_file]
10 img2webp argument_file_name
11
13 This manual page documents the img2webp command.
14
15 img2webp compresses a sequence of images using the animated WebP for‐
16 mat. Input images can either be PNG, JPEG, TIFF or WebP. If a single
17 file name (not starting with the character '-') is supplied as the ar‐
18 gument, the command line arguments are actually tokenized from this
19 file. This allows for easy scripting or using a large number of argu‐
20 ments.
21
23 The file-level options are applied at the beginning of the compression
24 process, before the input frames are read.
25
26 -o string
27 Specify the name of the output WebP file.
28
29 -min_size
30 Encode images to achieve smallest size. This disables key frame
31 insertion and picks the parameters resulting in the smallest
32 output for each frame. It uses lossless compression by default,
33 but can be combined with -q, -m, -lossy or -mixed options.
34
35 -kmin int
36
37 -kmax int
38 Specify the minimum and maximum distance between consecutive key
39 frames (independently decodable frames) in the output animation.
40 The tool will insert some key frames into the output animation
41 as needed so that this criteria is satisfied.
42 -mixed Mixed compression mode: optimize compression of the image
43 by picking either lossy or lossless compression for each frame
44 heuristically. This global option disables the local option
45 -lossy and -lossless .
46
47 -near_lossless int
48 Specify the level of near-lossless image preprocessing. This op‐
49 tion adjusts pixel values to help compressibility, but has mini‐
50 mal impact on the visual quality. It triggers lossless compres‐
51 sion mode automatically. The range is 0 (maximum preprocessing)
52 to 100 (no preprocessing, the default). The typical value is
53 around 60. Note that lossy with -q 100 can at times yield better
54 results.
55
56 -sharp_yuv
57 Use more accurate and sharper RGB->YUV conversion if needed.
58 Note that this process is slower than the default 'fast'
59 RGB->YUV conversion.
60
61 -loop int
62 Specifies the number of times the animation should loop. Using
63 '0' means 'loop indefinitely'.
64
65 -v Be more verbose.
66
67 -h, -help
68 A short usage summary.
69
70 -version
71 Print the version numbers of the relevant libraries used.
72
73
75 The per-frame options are applied for the images following as arguments
76 in the command line. They can be modified any number of times preceding
77 each particular input image.
78
79 -d int Specify the image duration in milliseconds.
80
81 -lossless, -lossy
82 Compress the next image(s) using lossless or lossy compression
83 mode. The default mode is lossless.
84
85 -q float
86 Specify the compression factor between 0 and 100. The default is
87 75.
88
89 -m int Specify the compression method to use. This parameter controls
90 the trade off between encoding speed and the compressed file
91 size and quality. Possible values range from 0 to 6. Default
92 value is 4.
93
94
96 img2webp -loop 2 in0.png -lossy in1.jpg -d 80 in2.tiff -o out.webp
97
98
100 Please report all bugs to the issue tracker:
101 https://bugs.chromium.org/p/webp
102 Patches welcome! See this page to get started: https://www.webmpro‐
103 ject.org/code/contribute/submitting-patches/
104
105
107 img2webp is a part of libwebp and was written by the WebP team.
108 The latest source tree is available at https://chromium.google‐
109 source.com/webm/libwebp
110
111 This manual page was written by Pascal Massimino <pascal.mas‐
112 simino@gmail.com>, for the Debian project (and may be used by others).
113
114
116 webpmux(1), gif2webp(1)
117 Please refer to https://developers.google.com/speed/webp/ for addi‐
118 tional information.
119
120
121
122 March 17, 2023 IMG2WEBP(1)