webpmux

Manipulate WebP metadata and animation

TLDR

Extract frame from animation
$ webpmux -get frame [1] [input.webp] -o [frame.webp]
Get ICC profile
$ webpmux -get icc [input.webp] -o [profile.icc]
Set EXIF metadata
$ webpmux -set exif [metadata.exif] [input.webp] -o [output.webp]
Create animation from frames
$ webpmux -frame [1.webp] +[100] -frame [2.webp] +[100] -loop [0] -o [output.webp]
Show file info
$ webpmux -info [input.webp]
Strip EXIF metadata
$ webpmux -strip exif [input.webp] -o [output.webp]
Change frame duration of an animation
$ webpmux -duration [200] [input.webp] -o [output.webp]

SYNOPSIS

webpmux [-get|-set|-strip] [options] input [-o output]

DESCRIPTION

webpmux is a tool from Google's libwebp library for manipulating WebP image files at the container level. It can extract and set metadata profiles (ICC color, XMP, EXIF), extract individual frames from animated WebP files, and combine frames into animations.The tool operates on the WebP container format without re-encoding the image data, making operations fast and lossless. Metadata can be stripped from files to reduce size, or added to include color management and descriptive information.For animated WebP files, individual frames can be extracted as separate WebP images, and frame timing and looping parameters can be inspected with the info command.

PARAMETERS

-get TYPE

Extract data: frame n, icc, exif, or xmp.
-set TYPE FILE
Set metadata: icc, exif, or xmp.
-strip TYPE
Remove metadata: icc, exif, or xmp.
-frame FILE+OPTS
Add frame for animation (file +duration[+x+y[+method[blend]]]).
-duration DURATION[,START[,END]]
Set frame duration in milliseconds.
-loop COUNT
Loop count for animation (0=infinite, range 0-65535).
-bgcolor A,R,G,B
Background color for animation canvas (values 0-255).
-info
Display file information.
-o FILE
Output file.
-version
Display version number.

INSTALL

sudo apt install webp
sudo dnf install libwebp-tools
sudo apk add libwebp-tools
sudo zypper install libwebp-tools
brew install webp

CAVEATS

WebP format only. Part of libwebp-tools. Only one -strip/-get/-set operation per invocation; stripping multiple metadata types requires separate commands.

HISTORY

webpmux is part of libwebp by Google, providing tools to manipulate WebP images.

SEE ALSO

cwebp(1), dwebp(1), img2webp(1)