ffmpeg -i ~/media/test.mp4 -filter_complex volumedetect -c:v copy -f null /dev/null
...
[Parsed_volumedetect_0 @ 0x7f83a481c000] n_samples: 23887872
[Parsed_volumedetect_0 @ 0x7f83a481c000] mean_volume: -16.7 dB
[Parsed_volumedetect_0 @ 0x7f83a481c000] max_volume: -0.7 dB
[Parsed_volumedetect_0 @ 0x7f83a481c000] histogram_0db: 1
[Parsed_volumedetect_0 @ 0x7f83a481c000] histogram_1db: 0
[Parsed_volumedetect_0 @ 0x7f83a481c000] histogram_2db: 0
[Parsed_volumedetect_0 @ 0x7f83a481c000] histogram_3db: 2
[Parsed_volumedetect_0 @ 0x7f83a481c000] histogram_4db: 7
[Parsed_volumedetect_0 @ 0x7f83a481c000] histogram_5db: 45
[Parsed_volumedetect_0 @ 0x7f83a481c000] histogram_6db: 583
[Parsed_volumedetect_0 @ 0x7f83a481c000] histogram_7db: 17653
[Parsed_volumedetect_0 @ 0x7f83a481c000] histogram_8db: 302630
或
ffmpeg -i your_audio_file.mp3 -af "volumedetect" -vn -sn -dn -f null /dev/null 2>&1 | grep "mean_volume"
...
[Parsed_volumedetect_0 @ 0x55e2660ec4c0] mean_volume: -14.3 dB
标签:null,ffmpeg,音频,Multimedia,0x7f83a481c000,histogram,volume,volumedetect,Parsed
From: https://www.cnblogs.com/shaobin0604/p/17635134.html