Does FFMPEG have a "guard" against clipping?

Viewed 352

SoX has a flag for automatic gain control with the --guard flag. This helps prevent clipping during file conversion (i.e. resampling, bit depth conversion, mp3 to wave, etc). Does ffmpeg have anything similar?

It seems like an intuitive and common sense option to include; however, I can't find it. How come?

Thanks!

1 Answers

ffmpeg has two options built-in:

  1. loudnorm: simple audio normalization
  2. dynaudnorm: dynamic normalization that evens out quiet and loud sections

It is worth mentioning a Python tool built on top of ffmpeg called ffmpeg-normalize. Why consider using it? As a design principle, ffmpeg does not allow for two passes of a filter, and only after the first pass you know the max audio power. ffmpeg-normalize applies two passes, achieving more accurate and linear normalization. It's not suitable for all applications, so be sure to check out the README.

Related