# mini-ffmpeg

> Simple ffmpeg wrapper.

Latest version **0.3.0** (published 2023-04-30) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2023-04-30 |
| First published | 2023-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | erlc |
| Maintainers | erlc |
| Keywords | ffmpeg, wrapper |

## Links

- npm: https://www.npmjs.com/package/mini-ffmpeg
- npm.io page: https://npm.io/package/mini-ffmpeg

## Recent versions

- 0.3.0 (latest) — 2023-04-30
- 0.2.0 — 2023-04-28

## README

## Simple FFmpeg Wrapper

## Installing

**Npm:**

```shell
npm i mini-ffmpeg@latest
```

**Yarn:**

```shell
yarn add mini-ffmpeg@latest
```

## Example Usage

**Example 1:**

```js
// TypeScript
// import FFmpeg from "mini-ffmpeg"
const FFmpeg = require("mini-ffmpeg").default;

new FFmpeg()
        .inputs("./audio.mp3")
        // (option, param)
        .options("-acodec", "flac")
        .output("./audio.flac")
        .execute()
        .then(() => console.log("Ok"))
        .catch(console.log);
```

**Example 2:**

```js
// TypeScript
// import FFmpeg from "mini-ffmpeg"
const FFmpeg = require("mini-ffmpeg").default;

new FFmpeg()
        .inputs("./video.mp4", "./audio.mp3")
        .options(
        	"-hide_banner",
        	"-loglevel", "verbose",
        	"-c:v", "copy",
        	"-c:a", "aac"
        )
        .output("./result.mp4")
        .execute()
        .then(() => console.log("Ok"))
        .catch(console.log);
```

**Example 3:**

```js
// TypeScript
// import FFmpeg from "mini-ffmpeg"
const FFmpeg = require("mini-ffmpeg").default;

const audioUrl = "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3";

new FFmpeg()
        .inputs(audioUrl)
        .options("-acodec", "flac", "-b:a", "1411k")
        .output("./audio.flac")
        .execute()
        .then(() => console.log("Ok"))
        .catch(console.log);
```

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