Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normalize amplitude modulation #97

Open
engartst opened this issue May 3, 2019 · 12 comments
Open

normalize amplitude modulation #97

engartst opened this issue May 3, 2019 · 12 comments

Comments

@engartst
Copy link

engartst commented May 3, 2019

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

@slhck
Copy link
Owner

slhck commented May 6, 2019

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?

@engartst
Copy link
Author

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

@ilessing
Copy link

go for it Stewart. I think a link to Google drive location is appropriate.

@engartst
Copy link
Author

engartst commented May 21, 2019

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

@slhck
Copy link
Owner

slhck commented May 22, 2019

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.

@sampumon
Copy link

sampumon commented May 28, 2019

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? 😅

@kylophone
Copy link

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

@engartst
Copy link
Author

@ilessing can you share this?

thanks

@slhck
Copy link
Owner

slhck commented Jun 17, 2019

Closing for now. Please reopen if you have an original source file that you can share.

@slhck slhck closed this as completed Jun 17, 2019
@engartst
Copy link
Author

Hey @ilessing , can you share the source file?

@slhck
Copy link
Owner

slhck commented Jul 11, 2019

@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.

@engartst
Copy link
Author

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

@slhck slhck reopened this Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants