ffmpeg-normalize
ffmpeg-normalize copied to clipboard
normalize amplitude modulation
I'm using ffmpeg-normalize on a .wav file to create a EBU Normalized .mp3.
Settings for ffmpeg-normalize: target level = -16 LUFS true peak = -0.1 audio codec = libmp3lame audio bitrate = 320 k
I am having some issues that I am not having when I reproduce the settings through Steinburg's Wavelab . The sound seems to come and go instead of staying at a constant level (amplitude modulation).
Do you know why this might be happening? Is there an issue with window size of analysis/is there a way to set that? or are these peculiarities the results in running the script on a mono file vs. dual-mono?
Cheers, Stewart
As mentioned by the OP in an email, adding --dual-mono
seems to fix it, since the input files are mono, but I'm not sure if that is a proper workaround or if something else is going on. Stewart, would you have an example WAV file available for testing?
I have audio examples but cannot attach them here.
I could link to a GoogleDrive Folder but not sure if it is appropriate in the forum, let me know and I will.
Cheers, Stewart
go for it Stewart. I think a link to Google drive location is appropriate.
Hi all,
I have uploaded three mp3s here: https://drive.google.com/drive/folders/1DC9PY-3wJTSsQVPvf-ipGV35CCCY1vIN?usp=sharing
wavelabEBU.mp3 is the output with the above settings through WaveLab 8.5 ffmpegEBU.mp3 is the output with the above settings through ffmpeg-normalize without the --dual-mono tag ffmpegEBU_dualMono.mp3 is the output with the above settings through ffmpeg-normalize with the --dual-mono tag
The flag seemingly fixed the issue, let me know what you think
Thanks for sending these files. Since the file is indeed mono and meant to be played back on a stereo system, using the -dual_mono
flag seems to be correct usage. I don't know the underlying reason for that. I briefly looked into the relevant recommendations:
But I can't find a passage dealing with this topic in particular.
Note that it's actually an “issue” with the loudnorm
filter in ffmpeg itself, but I'll leave this open for the time being.
I notice modulation in ffmpegEBU_dualMono.mp3
also, right in the beginning between 0:02…0:06. It's less, but still quite annoying.
I have a difficult file too: https://vimeo.com/292682053
Adobe Media Encoder EBU-normalized it correctly, or at least without sudden volume drop during the loudest part at 0:41. Loudnorm refuses to to linear normalization:
ffmpeg -i U48_2018_Her_Fish.mp4 -af loudnorm=i=-23.0:lra=7.0:tp=0.0:offset=0.0:measured_i=-14.04:measured_lra=25.7:measured_tp=0.01:measured_thresh=-30.84:linear=true:print_format=summary -c:v copy Her_Fish_loudnorm2passHandBrew.mp4
[…]
[Parsed_loudnorm_0 @ 0x7fb5e580ba80]
Input Integrated: -14.0 LUFS
Input True Peak: +0.0 dBTP
Input LRA: 25.7 LU
Input Threshold: -30.8 LUFS
Output Integrated: -18.0 LUFS
Output True Peak: -2.1 dBTP
Output LRA: 25.7 LU
Output Threshold: -34.8 LUFS
Normalization Type: Dynamic
Target Offset: -5.0 LU
My guess is @engartst your input file also has true peak 0 dB? Mine actually has "+0.01 dB" with json output. Changing that to 0.0 in the above ffmpeg command does not fix the issue.
Who dares report this upstream? 😅
Hi,
@engartst can you please share your source file. I'll take a look and see what's happening. It's possible that there's a bug in the ffmpeg filter, but I'd need the source file to dig in.
Thanks, Kyle
@ilessing can you share this?
thanks
Closing for now. Please reopen if you have an original source file that you can share.
Hey @ilessing , can you share the source file?
@engartst, I think that Ian asked you for a source file since you were the one originally reporting the error? Ian never mentioned having issues.
Sorry for the miscommunication on my part!
I have added the original .wav to the google drive folder here (original.wav): https://drive.google.com/drive/folders/1DC9PY-3wJTSsQVPvf-ipGV35CCCY1vIN
Thanks all