Webpmux
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
名稱
webpmux
- 運用非動畫 WebP 圖片建立動畫 WebP 檔案。
從動畫 WebP 圖片中擷取影格,並管理 XMP/EXIF 中繼資料
和 ICC 設定檔
Synopsis
webpmux -get GET_OPTIONS INPUT -o OUTPUT
webpmux -set SET_OPTIONS INPUT -o OUTPUT
webpmux -strip STRIP_OPTIONS INPUT -o OUTPUT
webpmux -frame FRAME_OPTIONS [ -frame ... ] [ -loop LOOP_COUNT ]
[ -bgcolor BACKGROUND_COLOR ] -o OUTPUT
webpmux -duration DURATION OPTIONS [ -duration ... ] INPUT -o OUTPUT
webpmux -info INPUT
webpmux [-h|-help]
webpmux -version
webpmux argument_file_name
說明
webpmux
可用於建立/擷取動畫 WebP 檔案
來新增/擷取/移除 XMP/EXIF 中繼資料和 ICC 設定檔。
如果提供單一檔案名稱 (而非以「-」字元開頭) 為
引數,則指令列引數實際上是透過這個檔案進行符記化。
如此一來,您就可以輕鬆編寫指令碼或使用大量引數。
選項
GET_OPTIONS (-get
)
icc
- 取得 ICC 設定檔。
exif
- 取得 EXIF 中繼資料。
xmp
- 取得 XMP 中繼資料。
frame n
- 從動畫圖片中取得第 n 個畫面。(n = 0 有特殊意義:最後
影格)
SET_OPTIONS (-set
)
loop LOOP_COUNT
- 設定動畫檔案的循環次數。
地點:「LOOP_COUNT」必須介於 [0, 65535] 之間。
bgcolor BACKGROUND_COLOR
- 設定動畫背景顏色。
icc file.icc
- 設定 ICC 設定檔。
地點:「file.icc」包含要設定的 ICC 設定檔。
exif file.exif
- 設定 EXIF 中繼資料。
其中:「file.exif」包含要設定的 EXIF 中繼資料。
xmp file.xmp
- 設定 XMP 中繼資料。
位置:「file.xmp」包含要設定的 XMP 中繼資料。
STRIP_OPTIONS (-strip
)
icc
- 移除 ICC 設定檔。
exif
- 移除 EXIF 中繼資料。
xmp
- 移除 XMP 中繼資料。
DURATION_OPTIONS (-duration
)
修改特定影格間隔的時間長度。這個選項僅適用於
,且不會影響單一頁框檔案。
duration[,start[,end]]
地點:
duration
是間隔的持續時間,以毫秒為單位 (必要)。
不得為負數。start
是間隔的起始影格索引
(選用)。end
是區間的結束影格索引 (含)
(選用)。
這個選項的三種常見用法如下:
-
-duration d
將時間長度設為「d」製作完整動畫
-duration d,f
設定影格「f」的時間長度「d」。
-duration d,start,end
將時間長度設為「d」整個 [start,end] 間隔的時間
請注意,[start, end]
間隔以外的影格會持續顯示
而沒有任何改變end
值 0
具有特殊意義「最後一個影格
提醒事項:
索引範圍從 1
開始。
框架_OPTIONS (-frame
)
使用多張圖片 (非動畫) WebP 圖片建立動畫 WebP 檔案。
file_i +di[+xi+yi[+mi[bi]]]
- 其中:
file_i
是第 i1 個頁框 (WebP 格式)、xi
,yi
會指定
這個影格的影像偏移,di
是指下一個影格之前的暫停時間長度。
mi
是這個影格的處置方法 (0
代表 NONE,用於 NONE,代表 1
BACKGROUND) 和 bi
是這個影格的混合方法 (BLEND 則為 +b
)
或 -b
代表 NO_BLEND。bi
引數可省略,預設值為
+b
(BLEND)。此外,如果省略 bi
,則可省略 mi
,
預設為 0
(NONE)。最後,如果省略 mi
和 bi
,則 xi
和
yi
可以省略,預設為 +0+0
。
LOOP_COUNT
重複播放動畫的次數。
有效範圍為 0 到 65535 [預設:0 (無限)]。
BACKGROUND_COLOR
畫布的背景顏色。
其中:A
、R
、G
和 B
是 0
到 255
範圍內的整數,並指定
分別是 Alpha 版、紅色、綠色和藍色元件值
[預設:255,255,255,255
]。
WebP 格式的輸入檔案。
輸出 (-o
)
WebP 格式的輸出檔案。
注意:系統不會檢查 EXIF、XMP 和 ICC 資料的性質,並假設
才是有效名稱
錯誤
範例
新增 ICC 設定檔:
webpmux -set icc image_profile.icc in.webp -o icc_container.webp
擷取 ICC 設定檔:
webpmux -get icc icc_container.webp -o image_profile.icc
Strip ICC 設定檔:
webpmux -strip icc icc_container.webp -o without_icc.webp
新增 XMP 中繼資料:
webpmux -set xmp image_metadata.xmp in.webp -o xmp_container.webp
擷取 XMP 中繼資料:
webpmux -get xmp xmp_container.webp -o image_metadata.xmp
去除 XMP 中繼資料:
webpmux -strip xmp xmp_container.webp -o without_xmp.webp
新增 EXIF 中繼資料:
webpmux -set exif image_metadata.exif in.webp -o exif_container.webp
擷取 EXIF 中繼資料:
webpmux -get exif exif_container.webp -o image_metadata.exif
移除 EXIF 中繼資料:
webpmux -strip exif exif_container.webp -o without_exif.webp
使用 3 張 (非動畫) WebP 圖片建立動畫 WebP 檔案:
webpmux -frame 1.webp +100 -frame 2.webp +100+50+50 \
-frame 3.webp +100+50+50+1+b -loop 10 -bgcolor 255,255,255,255 \
-o anim_container.webp
從動畫 WebP 檔案取得第 2 個畫面:
webpmux -get frame 2 anim_container.webp -o frame_2.webp
使用以「-」開頭的輸入檔案名稱 -get/-set/-strip:
webpmux -set icc image_profile.icc -o icc_container.webp -- ---in.webp
webpmux -get icc -o image_profile.icc -- ---icc_container.webp
webpmux -strip icc -o without_icc.webp -- ---icc_container.webp
作者
webpmux
是 libwebp
的一部分,由 WebP 團隊撰寫。
最新原始碼樹狀結構位於
https://chromium.googlesource.com/webm/libwebp/
本手冊由 Vikas Arora vikaas.arora@gmail.com 撰寫,
安裝 Debian 專案 (也可能由其他人員使用)。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-08 (世界標準時間)。
[null,null,["上次更新時間:2025-08-08 (世界標準時間)。"],[[["\u003cp\u003e\u003ccode\u003ewebpmux\u003c/code\u003e is a command-line tool used to create and manipulate WebP images, including animated WebP files.\u003c/p\u003e\n"],["\u003cp\u003eIt allows for adding, extracting, and stripping metadata like ICC profiles, EXIF, and XMP, as well as setting animation loop counts and background colors.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ewebpmux\u003c/code\u003e can extract specific frames from animated WebP files and assemble animations from individual WebP images.\u003c/p\u003e\n"],["\u003cp\u003eUsers can manage frame durations and disposal methods within animated WebP files using the provided options.\u003c/p\u003e\n"],["\u003cp\u003eFor detailed usage and bug reporting, refer to the provided links within the documentation.\u003c/p\u003e\n"]]],["`webpmux` manages WebP files, enabling creation, extraction, and modification of animated WebP images. Key actions include using `-get` to retrieve ICC, EXIF, or XMP metadata, or a specific frame. Use `-set` to add metadata, set loop count, or modify background color. `-strip` removes metadata, while `-frame` creates animations from still images. The `-duration` option adjusts frame durations. You can use a loop count, set a backgroud color and create animated webp files with multiple frames.\n"],null,["# webpmux\n\nName\n----\n\n`webpmux` -- Create animated WebP files from non-animated WebP images,\nextract frames from animated WebP images, and manage XMP/EXIF metadata\nand ICC profile.\n\nSynopsis\n--------\n\n webpmux -get GET_OPTIONS INPUT -o OUTPUT\n webpmux -set SET_OPTIONS INPUT -o OUTPUT\n webpmux -strip STRIP_OPTIONS INPUT -o OUTPUT\n webpmux -frame FRAME_OPTIONS [ -frame ... ] [ -loop LOOP_COUNT ]\n [ -bgcolor BACKGROUND_COLOR ] -o OUTPUT\n webpmux -duration DURATION OPTIONS [ -duration ... ] INPUT -o OUTPUT\n webpmux -info INPUT\n webpmux [-h|-help]\n webpmux -version\n webpmux argument_file_name\n\nDescription\n-----------\n\n`webpmux` can be used to create/extract from animated WebP files, as well as\nto add/extract/strip XMP/EXIF metadata and ICC profile.\nIf a single file name (not starting with the character '-') is supplied as\nthe argument, the command line arguments are actually tokenized from this file.\nThis allows for easy scripting or using a large number of arguments.\n\nOptions\n-------\n\n### GET_OPTIONS (`-get`)\n\n`icc`\n: Get ICC profile.\n\n`exif`\n: Get EXIF metadata.\n\n`xmp`\n: Get XMP metadata.\n\n`frame n`\n: Get nth frame from an animated image. (n = 0 has a special meaning: last\n frame)\n\n### SET_OPTIONS (`-set`)\n\n`loop LOOP_COUNT`\n: Set loop count on an animated file.\n Where: 'LOOP_COUNT' must be in range \\[0, 65535\\].\n\n`bgcolor BACKGROUND_COLOR`\n: Set the animation background color.\n\n`icc file.icc`\n: Set ICC profile.\n Where: 'file.icc' contains the ICC profile to be set.\n\n`exif file.exif`\n: Set EXIF metadata.\n Where: 'file.exif' contains the EXIF metadata to be set.\n\n`xmp file.xmp`\n: Set XMP metadata.\n Where: 'file.xmp' contains the XMP metadata to be set.\n\n### STRIP_OPTIONS (`-strip`)\n\n`icc`\n: Strip ICC profile.\n\n`exif`\n: Strip EXIF metadata.\n\n`xmp`\n: Strip XMP metadata.\n\n### DURATION_OPTIONS (`-duration`)\n\nAmend the duration of a specific interval of frames. This option is only\neffective on animated WebP and has no effect on a single-frame file.\n\n`duration[,start[,end]]`\n\n: Where:\n `duration` is the duration for the interval in milliseconds (mandatory).\n Must be non-negative. `start` is the starting frame index of the interval\n (optional). `end` is the ending frame index (inclusive) of the interval\n (optional).\n\n The three typical usages of this option are:\n\n `-duration d`\n\n : set the duration to 'd' for the whole animation.\n\n `-duration d,f`\n\n : set the duration of frame 'f' to 'd'.\n\n `-duration d,start,end`\n\n : set the duration to 'd' for the whole \\[start,end\\] interval.\n\n Note that the frames outside of the `[start, end]` interval will remain\n untouched. The `end` value `0` has the special meaning 'last frame of\n the animation'.\n\n Reminder:\n frame indexing starts at `1`.\n\n### FRAME_OPTIONS (`-frame`)\n\nCreate an animated WebP file from multiple (non-animated) WebP images.\n\n`file_i +di[+xi+yi[+mi[bi]]]`\n: Where: `file_i` is the i'th frame (WebP format), `xi`,`yi` specify the\n image offset for this frame, `di` is the pause duration before next frame,\n `mi` is the dispose method for this frame (`0` for NONE or `1` for\n BACKGROUND) and `bi` is the blending method for this frame (`+b` for BLEND\n or `-b` for NO_BLEND). Argument `bi` can be omitted and will default to\n `+b` (BLEND). Also, `mi` can be omitted if `bi` is omitted and will\n default to `0` (NONE). Finally, if `mi` and `bi` are omitted then `xi` and\n `yi` can be omitted and will default to `+0+0`.\n\n### LOOP_COUNT\n\nNumber of times to repeat the animation.\nValid range is 0 to 65535 \\[Default: 0 (infinite)\\].\n\n### BACKGROUND_COLOR\n\nBackground color of the canvas.\nWhere: `A`, `R`, `G` and `B` are integers in the range `0` to `255` specifying\nthe Alpha, Red, Green and Blue component values respectively\n\\[Default: `255,255,255,255`\\].\n\n### INPUT\n\nInput file in WebP format.\n\n### OUTPUT (`-o`)\n\nOutput file in WebP format.\n\n**Note:** The nature of EXIF, XMP and ICC data is not checked and is assumed\nto be valid.\n\nBugs\n----\n\n- Please report all bugs to our issue tracker: \u003chttps://issues.webmproject.org\u003e\n\n - Patches welcome! See this page to get started: \u003chttps://www.webmproject.org/code/contribute/submitting-patches/\u003e\n\nExamples\n--------\n\nAdd ICC profile: \n\n webpmux -set icc image_profile.icc in.webp -o icc_container.webp\n\nExtract ICC profile: \n\n webpmux -get icc icc_container.webp -o image_profile.icc\n\nStrip ICC profile: \n\n webpmux -strip icc icc_container.webp -o without_icc.webp\n\nAdd XMP metadata: \n\n webpmux -set xmp image_metadata.xmp in.webp -o xmp_container.webp\n\nExtract XMP metadata: \n\n webpmux -get xmp xmp_container.webp -o image_metadata.xmp\n\nStrip XMP metadata: \n\n webpmux -strip xmp xmp_container.webp -o without_xmp.webp\n\nAdd EXIF metadata: \n\n webpmux -set exif image_metadata.exif in.webp -o exif_container.webp\n\nExtract EXIF metadata: \n\n webpmux -get exif exif_container.webp -o image_metadata.exif\n\nStrip EXIF metadata: \n\n webpmux -strip exif exif_container.webp -o without_exif.webp\n\nCreate an animated WebP file from 3 (non-animated) WebP images: \n\n webpmux -frame 1.webp +100 -frame 2.webp +100+50+50 \\\n -frame 3.webp +100+50+50+1+b -loop 10 -bgcolor 255,255,255,255 \\\n -o anim_container.webp\n\nGet the 2nd frame from an animated WebP file: \n\n webpmux -get frame 2 anim_container.webp -o frame_2.webp\n\nUsing -get/-set/-strip with input file name starting with '-': \n\n webpmux -set icc image_profile.icc -o icc_container.webp -- ---in.webp\n webpmux -get icc -o image_profile.icc -- ---icc_container.webp\n webpmux -strip icc -o without_icc.webp -- ---icc_container.webp\n\nAuthors\n-------\n\n`webpmux` is part of `libwebp`, and was written by the WebP team.\nThe latest source tree is available at\n\u003chttps://chromium.googlesource.com/webm/libwebp/\u003e\n\nThis manual page was written by Vikas Arora [vikaas.arora@gmail.com](mailto:vikaas.arora@gmail.com), for\nthe Debian project (and may be used by others)."]]