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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@karinjs/plugin-ffmpeg

v0.1.1

Published

Provide Karin with an out of the box plugin for ffmpeg binary files

Readme

@karinjs/plugin-ffmpeg

一个为 Karin 提供开箱即用的 FFmpeg 二进制文件的插件,安装时自动下载 FFmpeg。

📦 安装

pnpm add @karinjs/plugin-ffmpeg -w

安装过程中会自动测速并选择最快的镜像源下载 FFmpeg、FFprobe 和 FFplay(仅 Windows)二进制文件。

⚠️ pnpm 10 用户注意

如果你使用 pnpm 10,需要使用以下安装命令以允许执行安装脚本:

pnpm --allow-build=@karinjs/plugin-ffmpeg add @karinjs/plugin-ffmpeg -w

这是因为 pnpm 10 为了安全考虑,默认会阻止依赖包的安装脚本执行。本插件需要在安装时下载 FFmpeg 二进制文件,因此必须允许脚本执行。

🛠️ 开发

本地开发

# 安装依赖
pnpm install

# 开发模式
pnpm dev

# 构建
pnpm build

# 测试安装脚本
node lib/postinstall.js

项目结构

src/
├── index.ts        # 主入口,提供 FFmpeg 路径访问
├── download.ts     # 下载和解压逻辑
├── postinstall.ts  # 安装后脚本
└── types.ts        # TypeScript 类型定义

lib/                # 编译输出目录
├── index.js
├── download.js
└── postinstall.js

💡 常见问题

下载失败怎么办?

插件会自动测速并尝试多个下载源(包括 12 个国内镜像),如果所有源都失败,请检查网络连接。

你也可以手动运行安装脚本:

# 自动选择最快的源
node lib/postinstall.js

# 手动指定源(Windows PowerShell)
$env:FFMPEG_PROXY_INDEX=2; node lib/postinstall.js

# 手动指定源(Linux/macOS)
FFMPEG_PROXY_INDEX=2 node lib/postinstall.js

FFmpeg 来源

本插件使用 BtbN/FFmpeg-Builds 提供的每日构建版本。

下载源列表

插件内置 12 个镜像源,安装时会自动测速选择最快的:

  • 1 - GitHub 官方
  • 2 - ghfast 镜像
  • 3 - git.yylx 镜像
  • 4 - gh-proxy 镜像
  • 5 - ghfile 镜像
  • 6 - gh-proxy.net 镜像
  • 7 - 1win 镜像
  • 8 - ghm 镜像
  • 9 - gitproxy 镜像
  • 10 - jiashu 镜像
  • 11 - tbedu 镜像
  • 12 - ghproxy 镜像

支持哪些平台?

  • Windows (x64, x86)
  • Linux (x64, arm64, i686)
  • macOS (暂不支持,BtbN 不提供 macOS 构建)

存储位置

FFmpeg 二进制文件会下载到项目根目录的 node_modules/.ffmpeg 文件夹中。

📄 许可证

MIT

🤝 贡献

欢迎提交 Issue 和 Pull Request!