# @gdty/ffmpeg

> Platform independent binary installer of FFmpeg for node projects

Latest version **1.2.1** (published 2025-09-28) · 0 weekly downloads

## Install

```sh
npm install @gdty/ffmpeg
pnpm add @gdty/ffmpeg
yarn add @gdty/ffmpeg
bun add @gdty/ffmpeg
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2025-09-28 |
| First published | 2024-03-07 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 17.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | gdty |
| Maintainers | timfeng |
| Keywords | ffmpeg, binary, installer, audio, sound |

## Links

- npm: https://www.npmjs.com/package/@gdty/ffmpeg
- Repository: https://gitee.com/gdteyu/node-ffmpeg-installer
- Homepage: https://gitee.com/gdteyu/node-ffmpeg-installer.git
- Issues: https://gitee.com/gdteyu/node-ffmpeg-installer/issues
- npm.io page: https://npm.io/package/@gdty/ffmpeg

## Dependencies (8)

- [@gdty/ffmpeg-linux-arm](https://npm.io/package/@gdty/ffmpeg-linux-arm.md) ^1.0.5
- [@gdty/ffmpeg-linux-x64](https://npm.io/package/@gdty/ffmpeg-linux-x64.md) ^1.0.5
- [@gdty/ffmpeg-win32-x64](https://npm.io/package/@gdty/ffmpeg-win32-x64.md) ^1.0.5
- [@gdty/ffmpeg-darwin-x64](https://npm.io/package/@gdty/ffmpeg-darwin-x64.md) ^1.0.5
- [@gdty/ffmpeg-linux-ia32](https://npm.io/package/@gdty/ffmpeg-linux-ia32.md) ^1.0.5
- [@gdty/ffmpeg-win32-ia32](https://npm.io/package/@gdty/ffmpeg-win32-ia32.md) ^1.0.5
- [@gdty/ffmpeg-linux-arm64](https://npm.io/package/@gdty/ffmpeg-linux-arm64.md) ^1.0.5
- [@gdty/ffmpeg-darwin-arm64](https://npm.io/package/@gdty/ffmpeg-darwin-arm64.md) ^1.0.5

## Recent versions

- 1.2.1 (latest) — 2025-09-28
- 1.2.0 — 2025-09-27
- 1.1.9 — 2025-09-27
- 1.1.7 — 2025-07-28
- 1.1.6 — 2024-12-26
- 1.1.5 — 2024-12-26
- 1.1.4 — 2024-12-26
- 1.1.3 — 2024-12-26
- 1.1.2 — 2024-07-02
- 1.1.1 — 2024-05-07
- 1.1.0 — 2024-05-07
- 1.0.9 — 2024-05-07
- 1.0.8 — 2024-05-07
- 1.0.7 — 2024-05-07
- 1.0.6 — 2024-04-16
- … 6 more at https://npm.io/package/@gdty/ffmpeg/versions

## README

# node-ffmpeg-installer

一个跨平台的FFmpeg二进制安装包，专为Node.js项目设计。适用于那些在多种环境中都能“开箱即用”的工具。

支持Linux、Windows和Mac OS/X系统。

通过`optionalDependencies`、`cpu`和`os`等package.json字段的组合，安装器仅下载适用于当前平台的二进制文件。请参见下面的“安装时的警告”。

## 安装

```bash
npm install --save @gdty/ffmpeg
```

## 使用示例

```javascript
const ffmpeg = require('@gdty/ffmpeg');
console.log(ffmpeg.path, ffmpeg.version);
```

### [process.spawn()](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)

```javascript
const ffmpegPath = require('@gdty/ffmpeg').path;
const spawn = require('child_process').spawn;
const ffmpeg = spawn(ffmpegPath, args);
ffmpeg.on('exit', onExit);
```

### [fluent-ffmpeg](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg)

```javascript
const ffmpegPath = require('@gdty/ffmpeg').path;
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegPath);
```

## 常见问题

### 更新版本

更新版本时，需要把平台包一起升级。

## 平台打包

忽略平台
```
npm install --force
或
yarn install --ignore-platform
```

---
_Source: https://npm.io/package/@gdty/ffmpeg · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
