ffmpeg:loudnorm_analyze
ffmpeg:loudnorm_analyze¶
EBU R128 loudness normalization using ffmpeg's loudnorm
filter - analysis pass. Runs an analysis pass to gather information about the source audio.
Full documentation of the tool can be found here:
[ffmpeg - loudnorm](https://ffmpeg.org/ffmpeg-filters.html#loudnorm)
Optionally, the tool can run a second pass to apply the normalization to the audio.
To do that, specify the "output" parameter with the desired ffmpeg arguments.
The data from the analysis pass will automatically be used to set the appropriate ffmpeg filter arguments.
Example:
{
"parameters": {
"input_file": "input.mp4",
"audio_selector": "0:a:0",
"env_prefix": "my_audio_",
"integrated_loudness_target: "-24.0",
"maximum_true_peak": "-2.0",
"loudness_range_target": "7.0",
"output": {
"ffmpeg_args": [
"-c:a", "libfdk_aac",
"-ar", "48000",
"-b:a", "128k",
"-ac", "2",
"out.m4a"
]
}
},
"tool": "ffmpeg:loudnorm_analyze"
}
Returns analysis result in environment variables using the specified prefix.
The ffmpeg filter returns the following:
{
"input_i" : "-27.61",
"input_tp" : "-4.47",
"input_lra" : "18.06",
"input_thresh" : "-39.20",
"output_i" : "-16.58",
"output_tp" : "-1.50",
"output_lra" : "14.78",
"output_thresh" : "-27.71",
"normalization_type" : "dynamic",
"target_offset" : "0.58"
}
Given a prefix of "my_audio_" this tool sets the following environment variables:
my_audio_input_i: -27.61
my_audio_input_tp: -4.47
my_audio_input_lra: 18.06
my_audio_input_thresh: -39.20
my_audio_output_i: -16.58
my_audio_output_tp: -1.50
my_audio_output_lra: 14.78
my_audio_output_thresh: -27.71
my_audio_normalization_type: dynamic
my_audio_target_offset: 0.58
Parameter | Properties | Default | Type | Choice | Description |
---|---|---|---|---|---|
input_file | required | input file to pass to ffmpeg | |||
audio_selector | optional | 0:a:0 | str | ffmpeg's input selector to use to select the desired audio track | |
env_prefix | optional | my_audio_ | str | prefix to use for environment variable names | |
integrated_loudness_target | optional | -24.0 | str | integrated loudness target (I) | |
maximum_true_peak | optional | -2.0 | str | maximum true peak (TP) | |
loudness_range_target | optional | 7.0 | str | loudness range target (LRA) | |
output | optional | {} | dict | output settings |