title: ffmpeg volumedetect returns unstable result
body: <p>I am using ffmpeg to calculate the volume of my audio file, but I find that ffmpeg returns different values for different containers (like mp3 v.s. ogg)</p>
  
  <p>Here is an example. I am using an ogg file from Wikimedia Commons, and converting it to mp3, then analyze the volume of both files. For ogg file, I get -3.0 dB for mean volume, but for mp3 file, I get -3.4 dB. When I use other files, I also get different max volume and histogram. </p>
  
  <pre><code>[user@localhost tmp]$ wget https://upload.wikimedia.org/wikipedia/commons/b/b9/Audio_Frequency_tone%2C_Middle_C%2C_C4%2C_261.63hz.ogg -O a.ogg 2&gt; /dev/null
  [user@localhost tmp]$ ffmpeg -i a.ogg a.mp3 2&gt; /dev/null
  [user@localhost tmp]$ ffmpeg -i a.ogg -af volumedetect tmp.ogg 2&gt;&amp;1 | grep volumedetect
  [Parsed_volumedetect_0 @ 0x555f69f3f4a0] n_samples: 88768
  [Parsed_volumedetect_0 @ 0x555f69f3f4a0] mean_volume: -3.0 dB
  [Parsed_volumedetect_0 @ 0x555f69f3f4a0] max_volume: 0.0 dB
  [Parsed_volumedetect_0 @ 0x555f69f3f4a0] histogram_0db: 27541
  [user@localhost tmp]$ ffmpeg -i a.mp3 -af volumedetect tmp.mp3 2&gt;&amp;1 | grep volumedetect
  [Parsed_volumedetect_0 @ 0x55fd62be4740] n_samples: 88768
  [Parsed_volumedetect_0 @ 0x55fd62be4740] mean_volume: -3.4 dB
  [Parsed_volumedetect_0 @ 0x55fd62be4740] max_volume: -0.0 dB
  [Parsed_volumedetect_0 @ 0x55fd62be4740] histogram_0db: 21340
  [user@localhost tmp]$ 
  </code></pre>
  
  <p>Why is this bug happening? Which one should I believe? </p>