Commit d771b1d1 authored by Clément Bœsch's avatar Clément Bœsch

lavfi: EBU R.128 scanner.

parent 81bbce9c
...@@ -3,6 +3,7 @@ releases are sorted from youngest to oldest. ...@@ -3,6 +3,7 @@ releases are sorted from youngest to oldest.
version next: version next:
- stream disposition information printing in ffprobe - stream disposition information printing in ffprobe
- filter for loudness analysis following EBU R128
version 1.0: version 1.0:
......
...@@ -1901,6 +1901,7 @@ decimate_filter_deps="gpl avcodec" ...@@ -1901,6 +1901,7 @@ decimate_filter_deps="gpl avcodec"
delogo_filter_deps="gpl" delogo_filter_deps="gpl"
deshake_filter_deps="avcodec" deshake_filter_deps="avcodec"
drawtext_filter_deps="libfreetype" drawtext_filter_deps="libfreetype"
ebur128_filter_deps="gpl"
flite_filter_deps="libflite" flite_filter_deps="libflite"
frei0r_filter_deps="frei0r dlopen" frei0r_filter_deps="frei0r dlopen"
frei0r_filter_extralibs='$ldl' frei0r_filter_extralibs='$ldl'
......
...@@ -4480,6 +4480,53 @@ setpts=PTS+10/TB ...@@ -4480,6 +4480,53 @@ setpts=PTS+10/TB
@end example @end example
@end itemize @end itemize
@section ebur128
EBU R128 scanner filter. This filter takes an audio stream as input and outputs
it unchanged. By default, it logs a message at a frequency of 10Hz with the
Momentary loudness (identified by @code{M}), Short-term loudness (@code{S}),
Integrated loudness (@code{I}) and Loudness Range (@code{LRA}).
The filter also has a video output (see the @var{video} option) with a real
time graph to observe the loudness evolution. The graphic contains the logged
message mentioned above, so it is not printed anymore when this option is set,
unless the verbose logging is set. The main graphing area contains the
short-term loudness (3 seconds of analysis), and the gauge on the right is for
the momentary loudness (400 milliseconds).
More information about the Loudness Recommendation EBU R128 on
@url{http://tech.ebu.ch/loudness}.
The filter accepts the following named parameters:
@table @option
@item video
Activate the video output. The audio stream is passed unchanged whether this
option is set or no. The video stream will be the first output stream if
activated. Default is @code{0}.
@item size
Set the video size. This option is for video only. Default and minimum
resolution is @code{640x480}.
@item meter
Set the EBU scale meter. Default is @code{9}. Common values are @code{9} and
@code{18}, respectively for EBU scale meter +9 and EBU scale meter +18. Any
other integer value between this range is allowed.
@end table
Example of real-time graph using @command{ffplay}, with a EBU scale meter +18:
@example
ffplay -f lavfi -i "amovie=input.mp3,ebur128=video=1:meter=18 [out0][out1]"
@end example
Run an analysis with @command{ffmpeg}:
@example
ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null -
@end example
@section settb, asettb @section settb, asettb
Set the timebase to use for the output frames timestamps. Set the timebase to use for the output frames timestamps.
......
...@@ -66,6 +66,7 @@ OBJS-$(CONFIG_ATEMPO_FILTER) += af_atempo.o ...@@ -66,6 +66,7 @@ OBJS-$(CONFIG_ATEMPO_FILTER) += af_atempo.o
OBJS-$(CONFIG_CHANNELMAP_FILTER) += af_channelmap.o OBJS-$(CONFIG_CHANNELMAP_FILTER) += af_channelmap.o
OBJS-$(CONFIG_CHANNELSPLIT_FILTER) += af_channelsplit.o OBJS-$(CONFIG_CHANNELSPLIT_FILTER) += af_channelsplit.o
OBJS-$(CONFIG_EARWAX_FILTER) += af_earwax.o OBJS-$(CONFIG_EARWAX_FILTER) += af_earwax.o
OBJS-$(CONFIG_EBUR128_FILTER) += f_ebur128.o
OBJS-$(CONFIG_JOIN_FILTER) += af_join.o OBJS-$(CONFIG_JOIN_FILTER) += af_join.o
OBJS-$(CONFIG_PAN_FILTER) += af_pan.o OBJS-$(CONFIG_PAN_FILTER) += af_pan.o
OBJS-$(CONFIG_RESAMPLE_FILTER) += af_resample.o OBJS-$(CONFIG_RESAMPLE_FILTER) += af_resample.o
......
...@@ -58,6 +58,7 @@ void avfilter_register_all(void) ...@@ -58,6 +58,7 @@ void avfilter_register_all(void)
REGISTER_FILTER (CHANNELMAP, channelmap, af); REGISTER_FILTER (CHANNELMAP, channelmap, af);
REGISTER_FILTER (CHANNELSPLIT,channelsplit,af); REGISTER_FILTER (CHANNELSPLIT,channelsplit,af);
REGISTER_FILTER (EARWAX, earwax, af); REGISTER_FILTER (EARWAX, earwax, af);
REGISTER_FILTER (EBUR128, ebur128, af);
REGISTER_FILTER (JOIN, join, af); REGISTER_FILTER (JOIN, join, af);
REGISTER_FILTER (PAN, pan, af); REGISTER_FILTER (PAN, pan, af);
REGISTER_FILTER (SILENCEDETECT, silencedetect, af); REGISTER_FILTER (SILENCEDETECT, silencedetect, af);
......
This diff is collapsed.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "libavutil/avutil.h" #include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3 #define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 18 #define LIBAVFILTER_VERSION_MINOR 19
#define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ #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