npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

awebp

v1.0.11

Published

awebp 修改 animated webp 的工具比如修复ffmpeg转出webp层叠展示问题和压缩

Downloads

11

Readme

AWebp

animated webp 小工具, 对 libwebp 的简单封装, 提供对 animated webp 相关的常用批处理功能(笨方法)

> npm i -g awebp
> awebp -h

  -h --help                                                      显示帮助
  -d --dispose [method] [file] [outFile]                         dispose-method: 0 for NONE or 1 for BACKGROUND
  -q --quality [quality] [file] [outFile]                        Specify the compression between 0 and 100
  -e --extract-frame [file] [outDir]                             提取所有帧出来
  -c --compose [frameDir] [outFile] [frameOpt] [loop] [bgColor]          从多个图片合成animated webp, frameOpt与webpmux一致
  -i --info [file]                                               统计duration
  -f --fps [fps] [file] [outFile]                                修改duration, fps更好描述
  -l --loop [loop] [file] [outFile]                              修改loop, 0为无限循环
  -b --bg-color [bgColor] [file] [outFile]                       修改webp背景颜色, A,R,G,B

Examples:
  awebp -d 0 ./test/test.webp                                    // 设置webp每帧的dispose method为0
  awebp -q 60 ./test/test.webp                                   // 设置动图webp压缩率, 提取帧->转png->重新拼接webp
  awebp -e ./test/test.webp frames                               // 提取所有帧出来到frames文件夹
  awebp -c frames out.webp +34+0+0+1+b 1 255,255,255,255         // 从frames文件夹合成webp
  awebp -i ./test/test.webp                                      // 统计出animated webp duration
  awebp -f 60 ./test/test.webp                                   // 修改 animated webp duration (60fps ~= 17)
  awebp -l 3 ./test/test.webp                                    // 修改webp的循环次数为 3 次
  awebp -b 0,0,0,0 ./test/test.webp                              // 修改webp背景颜色

使用场景

  1. ffmpeg 转换出来的 webp 重叠问题, 需要设置 dispose-method 为 BACKGROUND
  2. animated webp 压缩

TODO

  1. 兼容其他操作系统
  2. 完善 info 命令
  3. 命令耗时统计 √
  4. 背景颜色输入兼容更多格式