# ffmpeg-cli

> ffmpeg with support for multiple OSs

Latest version **2.7.5** (published 2021-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install ffmpeg-cli
pnpm add ffmpeg-cli
yarn add ffmpeg-cli
bun add ffmpeg-cli
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.7.5 |
| Published | 2021-08-08 |
| First published | 2019-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 (+19 in 2 direct dependencies) |
| Install scripts | yes |
| GitHub stars | 17 |
| Author | Wilson Nguyen |
| Maintainers | potatoparser |
| Keywords | ffmpeg, video, audio, image, media, cli |

## Links

- npm: https://www.npmjs.com/package/ffmpeg-cli
- Repository: https://github.com/PotatoParser/ffmpeg-cli
- Homepage: https://github.com/PotatoParser/ffmpeg-cli#readme
- Issues: https://github.com/PotatoParser/ffmpeg-cli/issues
- npm.io page: https://npm.io/package/ffmpeg-cli

## Dependencies (5)

- [tar](https://npm.io/package/tar.md) ^6.1.6
- [adm-zip](https://npm.io/package/adm-zip.md) ^0.4.14
- [progress](https://npm.io/package/progress.md) ^2.0.3
- [lzma-native](https://npm.io/package/lzma-native.md) ^6.0.1
- [follow-redirects](https://npm.io/package/follow-redirects.md) ^1.13.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 2.7.5 (latest) — 2021-08-08
- 2.7.4 — 2021-08-08
- 2.7.3 — 2021-04-26
- 2.7.2 — 2021-03-04
- 2.7.1 — 2020-10-24
- 2.7.0 — 2020-09-27
- 2.6.0 — 2020-09-26
- 2.5.2 — 2020-08-04
- 2.5.1 — 2020-05-22
- 2.5.0 — 2020-05-01
- 2.4.2 — 2020-04-04
- 2.4.1 — 2020-04-04
- 2.4.0 — 2020-03-16
- 2.3.0 — 2020-01-01
- 2.2.0 — 2019-05-22
- … 6 more at https://npm.io/package/ffmpeg-cli/versions

## README

# ffmpeg-cli
[![Build Status](https://img.shields.io/travis/com/PotatoParser/ffmpeg-cli/master?style=flat-square)](https://travis-ci.com/PotatoParser/ffmpeg-cli) [![Node LTS](https://img.shields.io/badge/Node-LTS-brightgreen.svg?style=flat-square)](https://nodejs.org/en/download/) [![Node v10](https://img.shields.io/badge/Node-v10-brightgreen.svg?style=flat-square)](https://nodejs.org/dist/latest-v10.x/)

A simple way of implementing FFmpeg regardless of OS
```javascript
const ffmpeg = require("ffmpeg-cli");
ffmpeg.run("-version");
console.log(ffmpeg.runSync("-version"));
```
## Hassle Free!
No need to install other programs as ffmpeg-cli will download and extract necessary binaries for your OS!

## Supported OS
+ MacOS ~ 64 bit
+ Linux ~ 32/64 bit
+ Windows ~ [~~32/~~](https://github.com/PotatoParser/ffmpeg-cli/issues/9)64 bit

## FFmpeg Path
Returns the path of FFmpeg executable
```javascript
ffmpeg.path;
// Ex: C:\Users\PotatoParser\Desktop\NodeJS\ffmpeg-cli\ffmpeg\win32x64\bin\ffmpeg.exe
```
## Synchronous Commands
Returns the output from FFmpeg
```javascript
ffmpeg.runSync(commands);
// Ex: ffmpeg.runSync(`-i input.jpg -vf scale=320:240 output.png`);
```
## Asynchronous Commands
Returns a `Promise`
```javascript
ffmpeg.run(commands);
ffmpeg.run(commands).catch((error)=>{...}); // Catch errors
ffmpeg.run(commands).then((result)=>{...}); // Only results
ffmpeg.run(commands).then((result)=>{...}).catch((error)=>{...}); // Catches when errors found
```

## FFmpeg Force Re-Download
**Run to redownload (synchronously) ffmpeg files**
Returns true if download is successful

```javascript
ffmpeg.forceDownload();
```

## FFmpeg Documentation
[FFmpeg's Official Documentation](https://www.ffmpeg.org/ffmpeg.html)

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