Audio normalization with ffmpeg.
npm install ffmpeg-normalize> 🎧 Audio loudness normalization with ffmpeg.
``bash`
npm install ffmpeg-normalize
`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
});
`
Parameters:
* input
* output
* loudness
* verbose
#### input
Type: string true
Required:
Path to the input file.
#### output
Type: string true
Required:
Path to the output file.
#### loudness
Type: object true
Required:
Describes a target loudness.
#### verbose
Type: boolean false
Required: false
Default:
When true sends ffmpeg input to stdout.
Type: string true
Required: ebuR128
Options: (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 true
Required:
ebu R128 normalization
Min: -70.0 -5.0
Max: -23
Default:
rms and peak normalization (Experimental)
Min: -99 0
Max: -23
Default:
The normalization target level in dB/LUFS.
#### loudness input_lra
Type: number false
Required: 1.0
Min: 20.0
Max: 7.0
Default:
Loudness range.
#### loudness input_tp
Type: number false
Required: -9.0
Min: 0.0
Max: -2.0`
Default:
True peak.
MIT © Peter Forgacs