0

I'm looking at a way to ensure an audio file doesn't ever get too loud, but I do not want to change the samples if it is under a given threshold.

For example, I would like the file to have a maximum of -24dB. Anything in the file which is between -70dB and -24dB should not be changed.

Is there a way to accomplish this using the loudnorm extension of ffmpeg?

The following works if the input is over -24dB, but when it is under, it will increase the volume:

ffmpeg -i input.mp3 -vn -af loudnorm=I=-24 -ar 44.1k output.mp3

I'd like a way to decrease the volume only in areas where the input file is too loud.

3
  • 1
    Sounds like you want alimiter. See ffmpeg.org/ffmpeg-filters.html#alimiter
    – Gyan
    Dec 4, 2021 at 4:44
  • @Gyan, I'll have to test that... Only I don't really see a way to specify the threshold in dB. Dec 4, 2021 at 7:54
  • 1
    Add dB suffix e.g. limit=-30dB
    – Gyan
    Dec 4, 2021 at 7:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.