Commit c0c37800 authored by Kyle Swanson's avatar Kyle Swanson Committed by Paul B Mahol

avfilter: add loudnorm

Signed-off-by: 's avatarKyle Swanson <k@ylo.ph>
parent 42ee137a
......@@ -35,6 +35,7 @@ version <next>:
- Generic OpenMAX IL encoder with support for Raspberry Pi
- IFF ANIM demuxer & decoder
- Direct Stream Transfer (DST) decoder
- loudnorm filter
version 3.0:
- Common Encryption (CENC) MP4 encoding and decoding support
......
......@@ -358,6 +358,7 @@ Filters:
af_compand.c Paul B Mahol
af_firequalizer.c Muhammad Faiz
af_ladspa.c Paul B Mahol
af_loudnorm.c Kyle Swanson
af_pan.c Nicolas George
af_sidechaincompress.c Paul B Mahol
af_silenceremove.c Paul B Mahol
......
......@@ -226,6 +226,8 @@ External library support:
--enable-libcdio enable audio CD grabbing with libcdio [no]
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
and libraw1394 [no]
--enable-libebur128 enable libebur128 for EBU R128 measurement,
needed for loudnorm filter [no]
--enable-libfaac enable AAC encoding via libfaac [no]
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
--enable-libflite enable flite (voice synthesis) support via libflite [no]
......@@ -1472,6 +1474,7 @@ EXTERNAL_LIBRARY_LIST="
libcdio
libcelt
libdc1394
libebur128
libfaac
libfdk_aac
libflite
......@@ -2987,6 +2990,7 @@ hqdn3d_filter_deps="gpl"
interlace_filter_deps="gpl"
kerndeint_filter_deps="gpl"
ladspa_filter_deps="ladspa dlopen"
loudnorm_filter_deps="libebur128"
mcdeint_filter_deps="avcodec gpl"
movie_filter_deps="avcodec avformat"
mpdecimate_filter_deps="gpl"
......@@ -5593,6 +5597,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
{ check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
enabled libcaca && require_pkg_config caca caca.h caca_create_canvas
enabled libebur128 && require ebur128 ebur128.h ebur128_relative_threshold -lebur128
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
enabled libfdk_aac && { use_pkg_config fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
{ require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
......
......@@ -2711,6 +2711,61 @@ Modify the @var{N}-th control value.
If the specified value is not valid, it is ignored and prior one is kept.
@end table
@section loudnorm
EBU R128 loudness normalization. Includes both dynamic and linear normalization modes.
Support for both single pass (livestreams, files) and double pass (files) modes.
This algorithm can target IL, LRA, and maximum true peak.
To enable compilation of this filter you need to configure FFmpeg with
@code{--enable-libebur128}.
The filter accepts the following options:
@table @option
@item I, i
Set integrated loudness target.
Range is -70.0 - -5.0. Default value is -24.0.
@item LRA, lra
Set loudness range target.
Range is 1.0 - 20.0. Default value is 7.0.
@item TP, tp
Set maximum true peak.
Range is -9.0 - +0.0. Default value is -2.0.
@item measured_I, measured_i
Measured IL of input file.
Range is -99.0 - +0.0.
@item measured_LRA, measured_lra
Measured LRA of input file.
Range is 0.0 - 99.0.
@item measured_TP, measured_tp
Measured true peak of input file.
Range is -99.0 - +99.0.
@item measured_thresh
Measured threshold of input file.
Range is -99.0 - +0.0.
@item offset
Set offset gain. Gain is applied before the true-peak limiter.
Range is -99.0 - +99.0. Default is +0.0.
@item linear
Normalize linearly if possible.
measured_I, measured_LRA, measured_TP, and measured_thresh must also
to be specified in order to use this mode.
Options are true or false. Default is true.
@item print_format
Set print format for stats. Options are summary, json, or none.
Default value is none.
@end table
@section lowpass
Apply a low-pass filter with 3dB point frequency.
......
......@@ -89,6 +89,7 @@ OBJS-$(CONFIG_FLANGER_FILTER) += af_flanger.o generate_wave_table
OBJS-$(CONFIG_HIGHPASS_FILTER) += af_biquads.o
OBJS-$(CONFIG_JOIN_FILTER) += af_join.o
OBJS-$(CONFIG_LADSPA_FILTER) += af_ladspa.o
OBJS-$(CONFIG_LOUDNORM_FILTER) += af_loudnorm.o
OBJS-$(CONFIG_LOWPASS_FILTER) += af_biquads.o
OBJS-$(CONFIG_PAN_FILTER) += af_pan.o
OBJS-$(CONFIG_REPLAYGAIN_FILTER) += af_replaygain.o
......
This diff is collapsed.
......@@ -108,6 +108,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(HIGHPASS, highpass, af);
REGISTER_FILTER(JOIN, join, af);
REGISTER_FILTER(LADSPA, ladspa, af);
REGISTER_FILTER(LOUDNORM, loudnorm, af);
REGISTER_FILTER(LOWPASS, lowpass, af);
REGISTER_FILTER(PAN, pan, af);
REGISTER_FILTER(REPLAYGAIN, replaygain, af);
......
......@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 6
#define LIBAVFILTER_VERSION_MINOR 45
#define LIBAVFILTER_VERSION_MINOR 46
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment