# promise-audioconcat

> Concatenates multiple audio files using ffmpeg

Latest version **1.0.2** (published 2023-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install promise-audioconcat
pnpm add promise-audioconcat
yarn add promise-audioconcat
bun add promise-audioconcat
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-08-31 |
| First published | 2023-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dave Welsh |
| Maintainers | davewelsh79 |

## Links

- npm: https://www.npmjs.com/package/promise-audioconcat
- Repository: https://github.com/move-zig/promise-audioconcat
- Homepage: https://github.com/move-zig/promise-audioconcat#readme
- Issues: https://github.com/move-zig/promise-audioconcat/issues
- npm.io page: https://npm.io/package/promise-audioconcat

## Dependencies (2)

- [fluent-ffmpeg](https://npm.io/package/fluent-ffmpeg.md) ^2.1.2
- [@ffmpeg-installer/ffmpeg](https://npm.io/package/@ffmpeg-installer/ffmpeg.md) ^1.1.0

## Recent versions

- 1.0.2 (latest) — 2023-08-31
- 1.0.1 — 2023-08-30
- 1.0.0 — 2023-08-30

## README

# promise-audioconcat [![NPM](https://img.shields.io/npm/v/promise-audioconcat.svg)](https://www.npmjs.com/package/promise-audioconcat) [![Licence](https://img.shields.io/npm/l/promise-audioconcat.svg)](https://github.com/move-zig/promise-audioconcat) [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)

Concatenates multiple audio files using [`ffmpeg`](http://ffmpeg.org).

`promise-audioconcat` provides a programmatic interface to do basically the same as calling `ffmpeg` via CLI like:

```bash
ffmpeg -i "concat:audio1.mp3|audio2.mp3" -acodec copy out.mp3
```

## Install

```bash
npm install promise-audioconcat
```

## Usage

### TypeScript

```ts
import audioconcat from 'promise-audioconcat';
```

### JavaScript

```js
const audioconcat = require('promise-audioconcat');
```

## API

### `audioconcat(inputs: string[], output: string): Promise<void>`

* **inputs:** an array of the filenames of the audio files to concatenate
* **output:** the filename of the output file

**Note:** The output file will be overwritten if it exists.

```js
const songs = [
  'introduction.mp3',
  'recording.mp3',
];

const output = 'combined.mp3';

try {
  const output = await audioconcat(songs, output);
  console.log(`Audio created in ${output}`);
} catch (err) {
  console.error('Error:', err);
  console.error('ffmpeg stderr:', err.stderr);
}
```

## See also

* [audioconcat](https://www.npmjs.com/package/audioconcat) - The package that inspired this one
* [fluent-ffmpeg](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg) - The underlying ffmpeg library
* [@ffmpeg-installer/ffmpeg](https://github.com/kribblo/node-ffmpeg-installer) - Provides the required ffmpeg binaries

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