FFMPEG Loudness

Questions and answers on how to get the most out of FFAStrans
Post Reply
JohnB1
Posts: 35
Joined: Thu Feb 15, 2018 12:42 pm

FFMPEG Loudness

Post by JohnB1 »

Hi,

I have used the below command to fix a loudness file:

ffmpeg -i C:\Users\Test\Desktop\Test.mxf -c:v copy -af loudnorm=I=-23:TP=-1:LRA=11:measured_I=-23:measured_TP=-23:measured_LRA=0.1:measured_thresh=0:offset=-23:linear=true:print_format=summary C:\Users\Test\Desktop\Test_New.mxf

There are few problems that are occurring when I use this command.
1) I have put in the loudnorm variable -23 but the file does not meet the requirement I need for the audio.
2) What does each part of the command mean? I found this command on the internet without any explanation.

Thanks.
User avatar
FranceBB
Posts: 264
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: FFMPEG Loudness

Post by FranceBB »

just add the analyze node and set loudness to -23 by flagging "conform volume to" in your processing node.
This will result in a loudness that should be -23dB and in the specs of EBU R128 for broadcast and I recommend you to do it this way.
There's actual a way to do that yourself via Avisynth, but I DO NOT recommend it 'cause Avisynth normalizes audio by peak and it's very likely that it will screw things up or bring unexpected results. I'm talking about AmplifyDB and Normalize.

Avisynth (not the best way to do it):

Normalize performs peak normalization, so you have to set the amplitude of the loudest audio. For a particular peak decibel level, you gotta use the equation volume = 10^dB/20. For instance, to set a -3dB peak with volume = 10^-3/20 or 0.7079.
In this case you wanna set it to -23 LUFS it's gonna be about 0.10, but 0.11 should be fine as well.

In other words, if you wanna use Avisynth, put this in your custom avisynth script node:

ResampleAudio(48000)
Normalize(volume=0.12, show=false)
JohnB1
Posts: 35
Joined: Thu Feb 15, 2018 12:42 pm

Re: FFMPEG Loudness

Post by JohnB1 »

Hi,

Are you able to help me, by providing the neccessary items:
e.g
Folder ---> Loudness ---> Folder

All I want to do is put a file in and checks and fixes the file and sends it to the output folder.

Thanks
User avatar
FranceBB
Posts: 264
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: FFMPEG Loudness

Post by FranceBB »

Can you elaborate that? I don't know what you mean.
If you wanna use the inbuilt loudness handling of FFASTrans, you have to add the loudness node in your workflow (it has been added a few releases ago) and use it as described here:

viewtopic.php?f=5&t=661
Post Reply