Changes between Version 11 and Version 16 of Ticket #9352


Ignore:
Timestamp:
Jul 30, 2021, 4:52:54 PM (5 years ago)
Author:
Gregory Beauregard
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9352

    • Property Keywords ebur128 swresample added
    • Property Component avfilterswresample
    • Property Summary loudnorm filter goofs loudness measurements in some casesswresample can introduce significant audio distortion
  • Ticket #9352 – Description

    v11 v16  
     1UPDATE: see bottom, swresample is at fault
     2
    13Summary of the bug: The loudnorm filter can badly goof the loudness measurement in certain situations (e.g. particular inaudible noise after a resample) resulting in significant distortion if attempting to use it in dynamic mode or to get measurements.
    24
     
    3032
    3133In the 192 kHz resample the `ebur128` filter wrongly measures the integrated loudness to `I:          -0.1 LUFS`, similar to the wrong `loudnorm` measurement, but the 48 kHz case measures -22.2 as you'd expect. My understanding is the two filters share some measurement code, so presumably ffmpeg's measurement code is broken at 192 kHz.
     34
     35UPDATE 2:
     36The internal 192 kHz resample in `loudnorm` hid the real culprit here, swresample significantly distorting the audio itself.
     37
     38Listen to the sample with just the format conversions to see it has been significantly distorted:
     39{{{
     40ffplay -i loudnorm_samp.mkv -af aresample=ocl=stereo:dither_method=shibata:osr=48000,aformat=r=192000
     41}}}
     42
     43We can also produce the significant distortion with just one resample with a `s32` sample format:
     44{{{
     45ffplay -i loudnorm_samp.mkv -af aresample=ocl=stereo:dither_method=shibata:osr=48000:osf=s32
     46}}}
     47
     48Setting `resampler=soxr` does not fix the massive distortion.