Loudness true peak limiting

Use this forum to request features. Maybe you'll get lucky!
Steven
Posts: 1
Joined: Wed Jul 07, 2021 11:04 am

Re: Loudness true peak limiting

Post by Steven »

Hi,

I'm experimenting with FFAStrans and it's very impressive. I have the same questions as the users above, particularly jonathonz. I'd like to be able to conform an MP3 to -16 LUFS with a true peaks limiter incorporated using a 2-pass process. Has this been implemented since this question was asked? Apologies if it's already there and I've missed it or I don't understand the required workflow.

Thanks,

Steven
jonathonz
Posts: 11
Joined: Wed Jan 16, 2019 2:57 am

Re: Loudness true peak limiting

Post by jonathonz »

Hi Steven,

I ended up doing this using FFAStrans and calling an external python executable that in turn calls FFMPEG to do the two-pass loudness normalization. I haven't tested it in at least a year as we moved on to a different process since then, but it definitely worked. The caveat is that ideally you need the true peak headroom on your original file in order to boost it properly without engaging the compressor. The compressor is audible with highly dynamic content, but if you are processing material with a low loudness range (LRA) to begin with then you should be fine. The project is here:

https://github.com/slhck/ffmpeg-normalize

An example of the command I was calling in FFAStrans was:
ffmpeg-normalize -o "%s_stageout01%\%s_original_name%.mp3" -v -nt ebu -t -16 -tp -1.5 -lrt 8 --dual-mono -f -c:a libmp3lame -b:a 128K -e="-joint_stereo 1 -reservoir 1 -write_xing 0" -ar 44100 "%s_picked%\%s_original_name%.%s_original_ext%"

This produced an MP3, targeted to -16 LUFS, with a true peak of -1.5 with a loudness range of 8dB, at 128 CBR 44.1KHz sample rate, with a few other environmental specific MP3 requirements that you probably don't need to worry about.

Take care,

-Jonathon
movalex
Posts: 36
Joined: Thu Feb 06, 2020 2:23 pm

Re: Loudness true peak limiting

Post by movalex »

Is it possible to introduce ffmpeg_normalize as a tool inside FFASTrans? Does FFASTrans support custom nodes? If so, is there a documentation on that?
emcodem
Posts: 1812
Joined: Wed Sep 19, 2018 8:11 am

Re: Loudness true peak limiting

Post by emcodem »

@movalex
the encoding processors have a builtin functionality for normalizing audio, are you aware about that?
If i see correctly it uses acompressor, limiter and resample ffmpeg filter.
Which ffmpeg_normalize functionailty do you refer to and why you ask?

Regarding what you can do in direction of custom processors, we have this:
https://ffastrans.com/wiki/doku.php?id= ... processors

But regarding "transcoding", it would probably not pay off to implement a plugin processor really, for transcoding it is usually best to use the workflow to calculate the correct ffmpeg command.
emcodem, wrapping since 2009 you got the rhyme?
movalex
Posts: 36
Joined: Thu Feb 06, 2020 2:23 pm

Re: Loudness true peak limiting

Post by movalex »

My goal is to use EBU128 standard normalization with the target level of -23 LUFS.
I'm not sure how to achieve that with the builtin normalization functionality. The loudness analyzer has so many variables to fill, it is not very clear to me which I should use. It would be great if you could give me a hint on how to do that correctly.
emcodem
Posts: 1812
Joined: Wed Sep 19, 2018 8:11 am

Re: Loudness true peak limiting

Post by emcodem »

@movalex
for standard ebu R128 correction (in difference to what the trhead title says, true peak limiting), in the loudness analyzer, you only use the first value "set levels to". Basically you store this value to a user_variable and use it in the encoder in the "from table" iput.

I found this old example workflow for you in the forum:
LOUDNESS_STEREO_12_TO_XDCAM.json
(7.45 KiB) Downloaded 410 times
The most complex part in the analyzer is that you have to define the pairing how you want to analyze the original audio, in my example i use "descrete tracks 1 and total channels 2 (stereo) which leads to the analyzer working in stereo mode.

You can just change this workflow, delete the xdcam encoder and replace by h264 or whatever, just make sure to check the conform volume box and choose the "from table": s_loudness_12 variable. Then you will always get corrected stereo in the output.
emcodem, wrapping since 2009 you got the rhyme?
movalex
Posts: 36
Joined: Thu Feb 06, 2020 2:23 pm

Re: Loudness true peak limiting

Post by movalex »

Yeah, now I see that the loudness analyzer in FFASTrans works exactly how I need. Moreover, it has exactly same result as if the file was processed by `ffmpeg-normalize` script or by Davinci Resolve Normalize Audio Levels feature set to EBU R128 mode. Thanks again, now it is much clearer for me.
emcodem
Posts: 1812
Joined: Wed Sep 19, 2018 8:11 am

Re: Loudness true peak limiting

Post by emcodem »

Thats just perfect, thanks for letting me know @movalex
emcodem, wrapping since 2009 you got the rhyme?
graham728
Posts: 82
Joined: Sat Oct 13, 2018 10:54 pm

Re: Loudness true peak limiting

Post by graham728 »

I'd second this request. I recently had a file fail Vidchecker as it was .3 above true peak for R128. Vidchecker can give slightly different results to how Adobe Media Encoder will set true peak to. I have a preset set in Media Encoder to set true peak to -2 from -1 to get around any variations between Adobe and Vidchecker.
Post Reply