# ffmpeg-normalize

> Audio normalization with ffmpeg.

Latest version **1.8.0** (published 2019-08-05) · MIT license · 0 weekly downloads

## Install

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

## 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 | 1.8.0 |
| Published | 2019-08-05 |
| First published | 2018-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 2 |
| Unpacked size | 25 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31 |
| Author | Peter Forgacs |
| Maintainers | peter.forgacs |
| Keywords | ffmpeg-normalize, audio normalization, loudness normalization, ebu R128 |

## Links

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

## Dependencies (2)

- [ffmpeg-static](https://npm.io/package/ffmpeg-static.md) 2.5.0
- [ffprobe-static](https://npm.io/package/ffprobe-static.md) ^3.0.0

## Recent versions

- 1.8.0 (latest) — 2019-08-05
- 1.7.0 — 2019-07-24
- 1.6.0 — 2019-05-15
- 1.5.0 — 2019-05-08
- 1.4.0 — 2019-03-31
- 1.3.0 — 2018-05-31
- 1.2.0 — 2018-05-20
- 1.1.0 — 2018-05-20

## README

# ffmpeg-normalize [![Build Status](https://travis-ci.org/peterforgacs/ffmpeg-normalize.svg?branch=master)](https://travis-ci.org/peterforgacs/ffmpeg-normalize)[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=peterforgacs/ffmpeg-normalize)](https://dependabot.com)

<p align="center">
  <a href="https://github.com/peterforgacs/ffmpeg-normalize">
    <img src="https://upload.wikimedia.org/wikipedia/commons/7/76/FFmpeg_icon.svg" alt="sympact" width="150"/>
  </a>
</p>

> 🎧 Audio loudness normalization with ffmpeg.

## Install

```bash
npm install ffmpeg-normalize
```

## Usage

### Ebu R128

```js
const normalize = require('ffmpeg-normalize');

normalize({
    input: 'input.mp4',
    output: 'output.mp4',
    loudness: {
        normalization: 'ebuR128',
        target:
        {
            input_i: -23,
            input_lra: 7.0,
            input_tp: -2.0
        }
    },
    verbose: true
})
.then(normalized  => {
    // Normalized
})
.catch(error => {
    // Some error happened
});
```

## API

### normalize({ input, output, loudness, verbose })

Parameters:

* input
* output
* loudness
* verbose

#### input

Type: `string`  
Required: `true`

Path to the input file.

#### output

Type: `string`  
Required: `true`

Path to the output file.

#### loudness

Type: `object`  
Required: `true`

Describes a target loudness.

#### verbose

Type: `boolean`  
Required: `false`  
Default: `false`

When true sends ffmpeg input to stdout.

### loudness normalization

Type: `string`  
Required: `true`  
Options: `ebuR128` (Experimental `rms` || `peak`   )

The normalization method to use.
The ebu R128 normalization uses a two pass method to measure the original values of the input file.
The other normalization methods only need the input_i value set.

#### loudness input_i

Type: `number`  
Required: `true`  

ebu R128 normalization  
Min: `-70.0`  
Max: `-5.0`  
Default: `-23`  

rms and peak normalization (Experimental)  
Min: `-99`  
Max: `0`  
Default: `-23`  

The normalization target level in dB/LUFS.

#### loudness input_lra

Type: `number`  
Required: `false`  
Min: `1.0`  
Max: `20.0`  
Default: `7.0`  

Loudness range.  

#### loudness input_tp

Type: `number`  
Required: `false`  
Min: `-9.0`  
Max: `0.0`  
Default: `-2.0`  

True peak.

## License

MIT © [Peter Forgacs](http://peterforgacs.github.io)

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