[FFmpeg-user] Trying to use 'ebur128' results to set up 'loudnorm'

Paul B Mahol onemda at gmail.com
Tue May 21 23:04:25 EEST 2024


On Tue, May 21, 2024 at 10:52 AM Mark Filipak <markfilipak.imdb at gmail.com>
wrote:

> Attachments:
> 1. original ebur128.jpg
> 2. loudnorm-thresh=-85 pan ebur128.jpg
> 3. what I want ebur128.jpg
>
> ___1. The original
> has a 'shelf' just below LU = -13. That's soft speech.
> The peak is at LU = +9. That's shouting.
> So the transform I want goes like this:
> LU = -18..-14 gets no boost.
> LU = -14..+9 gets a linear boost to -11..+9.
> I assume 'LU' is Loudness Unit', eh? What is a loudness unit?
>
> Now, the range of 'loudnorm=measured_thresh' is -99..0, so 100 steps.
> Heaven knows what the scale is
> and whether it's linear. No matter: Pressing on...
>
> If LU = -18..9 maps linearly to 'measured_thresh' = -99..0, then Lu = -14
> is 'measured_thresh' =
> -85. I use "-85" in the next step.
>
>
> ___2. This command:
>
> ffmpeg -i "original.mp4" -map 0:a -filter_complex
> "[0:a]loudnorm=measured_thresh=-85,
> pan=stereo|FL<FL+0.5*FC+0.6*BL+0.6*SL|FR<FR+0.5*FC+0.6*BR+0.6*SR,ebur128=video=1:peak=true[a]"
> -map
> "[a]" -c:v libx265 -x265-params crf=16 -c:a ac3 "loudnorm-thresh=-85 pan
> ebur128.mp4"
>
> maps LU = -13..+9 to -11..-7. That brings the soft speech up wonderfully,
> but the shouting is dead.
>
>
> ___3. What I want maps LU = -14..+9 to -11..+9.
> But to map linearly with 'loudnorm' I need to specify 4 parameters:
> measured_I = -99..0
> measured_LRA = 0..99
> measured_TP = -99..99
> measured_thresh = -99..0
> I sorta know what 'thresh' is and I think it is '-85'. But I have no idea
> what 'I' and 'LRA' and
> 'TP' are. I have no idea how to measure them. I have no idea what the
> measurement units are. And I
> have no idea what their physical meanings are.
>
> Is there a way to measure the source video to determine these numbers? I'm
> partway there, but the
> rest of the way seems impossibly difficult; there's just too many unknowns.
>
> Help! Please! I thank you,
>

ffmpeg -i input.video -af
"aformat=fltp,pan=stereo|FL=FL+FC+LFE+SL+BL|FR=FR+FC+LFE+SR+BR,alimiter"
-c:v copy output.video

Loudnorm filter in ffmpeg codebase is bad and ugly especially in dynamic
mode.

The best output is using limiter after just summing all channels, and not
scaling channels prior to summing at all.
This depends on quality of limiter filter, there are many alternative
limiters like with effects within ladspa, lv2 and clap (only in Librempeg).


>
>
> --Mark._______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list