<p>Actually, the filter only supports 16-bit samples, so anything else will be converted. You can open a bug report of type enhancement at <a href="http://trac.ffmpeg.org" rel="nofollow noreferrer">trac.ffmpeg.org</a></p>

CC BY-SA 4.0
2022-01-25T06:17:42.590Z
Thank you! -- I have done so now: https://trac.ffmpeg.org/ticket/9613
user272901
CC BY-SA 4.0
2022-01-24T04:18:27.903Z
2022-01-24T04:18:27.903Z
Gyan
<p><a href="https://lacinato.com/pub/reaper/test3.wav" rel="nofollow noreferrer">Here is a test file</a> with peaks at +200 dBFS (it's an extreme example, but the same holds for a file with peaks a +1 dBFS).</p>
<p>When running the &quot;volumedetect&quot; filter on this file, ffmpeg appears to change to 16bit int to run the volume detection, causing everything above 0 dBFS to be clipped (see &quot;Stream mapping&quot; in the transcript below). The result is that it detects the peak at 0 dBFS instead of 200 dBFS (see &quot;max volume&quot; below.)</p>
<p>Am I missing something? Any way to work around this? The documentation says nothing about 32bit float being unsupported, so it seems like it should &quot;just work&quot;?</p>
<p>Example run:</p>
<pre><code>    $ ffmpeg -i test3.wav -filter:a volumedetect -f null /dev/null
    ffmpeg version 4.3.2-0+deb11u1ubuntu1 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 10 (Ubuntu 10.2.1-20ubuntu1)
      configuration: --prefix=/usr --extra-version=0+deb11u1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
      libavutil      56. 51.100 / 56. 51.100
      libavcodec     58. 91.100 / 58. 91.100
      libavformat    58. 45.100 / 58. 45.100
      libavdevice    58. 10.100 / 58. 10.100
      libavfilter     7. 85.100 /  7. 85.100
      libavresample   4.  0.  0 /  4.  0.  0
      libswscale      5.  7.100 /  5.  7.100
      libswresample   3.  7.100 /  3.  7.100
      libpostproc    55.  7.100 / 55.  7.100
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, wav, from 'test3.wav':
      Metadata:
        encoded_by      : REAPER
        date            : 2022-01-22
        creation_time   : 17-06-55
        time_reference  : 0
      Duration: 00:00:03.94, bitrate: 2823 kb/s
        Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 44100 Hz, stereo, flt, 2822 kb/s
    Stream mapping:
      Stream #0:0 -&gt; #0:0 (pcm_f32le (native) -&gt; pcm_s16le (native))
    Press [q] to stop, [?] for help
    Output #0, null, to '/dev/null':
      Metadata:
        encoded_by      : REAPER
        date            : 2022-01-22
        time_reference  : 0
        encoder         : Lavf58.45.100
        Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
        Metadata:
          encoder         : Lavc58.91.100 pcm_s16le
    size=N/A time=00:00:03.93 bitrate=N/A speed= 911x
    video:0kB audio:678kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [Parsed_volumedetect_0 @ 0x55617ae5e140] n_samples: 347156
    [Parsed_volumedetect_0 @ 0x55617ae5e140] mean_volume: -0.0 dB
    [Parsed_volumedetect_0 @ 0x55617ae5e140] max_volume: 0.0 dB
    [Parsed_volumedetect_0 @ 0x55617ae5e140] histogram_0db: 347155
</code></pre>

<ffmpeg><filter><loudness>
ffmpeg volumedetect filter doesn't work on 32bit float audio?
user272901
# ffmpeg volumedetect filter doesn't work on 32bit float audio?

(Asked by: username_0 on 2022-01-23)

Here is a test file with peaks at +200 dBFS (it's an extreme example, but the same holds for a file with peaks a +1 dBFS).
When running the "volumedetect" filter on this file, ffmpeg appears to change to 16bit int to run the volume detection, causing everything above 0 dBFS to be clipped (see "Stream mapping" in the transcript below). The result is that it detects the peak at 0 dBFS instead of 200 dBFS (see "max volume" below.)
Am I missing something? Any way to work around this? The documentation says nothing about 32bit float being unsupported, so it seems like it should "just work"?
Example run:
    $ ffmpeg -i test3.wav -filter:a volumedetect -f null /dev/null
    ffmpeg version 4.3.2-0+deb11u1ubuntu1 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 10 (Ubuntu 10.2.1-20ubuntu1)
      configuration: --prefix=/usr --extra-version=0+deb11u1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
      libavutil      56. 51.100 / 56. 51.100
      libavcodec     58. 91.100 / 58. 91.100
      libavformat    58. 45.100 / 58. 45.100
      libavdevice    58. 10.100 / 58. 10.100
      libavfilter     7. 85.100 /  7. 85.100
      libavresample   4.  0.  0 /  4.  0.  0
      libswscale      5.  7.100 /  5.  7.100
      libswresample   3.  7.100 /  3.  7.100
      libpostproc    55.  7.100 / 55.  7.100
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, wav, from 'test3.wav':
      Metadata:
        encoded_by      : REAPER
        date            : 2022-01-22
        creation_time   : 17-06-55
        time_reference  : 0
      Duration: 00:00:03.94, bitrate: 2823 kb/s
        Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 44100 Hz, stereo, flt, 2822 kb/s
    Stream mapping:
      Stream #0:0 -> #0:0 (pcm_f32le (native) -> pcm_s16le (native))
    Press [q] to stop, [?] for help
    Output #0, null, to '/dev/null':
      Metadata:
        encoded_by      : REAPER
        date            : 2022-01-22
        time_reference  : 0
        encoder         : Lavf58.45.100
        Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
        Metadata:
          encoder         : Lavc58.91.100 pcm_s16le
    size=N/A time=00:00:03.93 bitrate=N/A speed= 911x
    video:0kB audio:678kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [Parsed_volumedetect_0 @ 0x55617ae5e140] n_samples: 347156
    [Parsed_volumedetect_0 @ 0x55617ae5e140] mean_volume: -0.0 dB
    [Parsed_volumedetect_0 @ 0x55617ae5e140] max_volume: 0.0 dB
    [Parsed_volumedetect_0 @ 0x55617ae5e140] histogram_0db: 347155

**Tags:** ffmpeg, filter, loudness


---

## 1 answers

### Answer by username_1 on 2022-01-24. Score: 0 | Accepted answer

Actually, the filter only supports 16-bit samples, so anything else will be converted. You can open a bug report of type enhancement at [trac.ffmpeg.org](http://trac.ffmpeg.org)

> **Comments:**
> **username_0**: Thank you! -- I have done so now: https://trac.ffmpeg.org/ticket/9613  

---

