`adrawgraph’ (for `astats’)

Watch on youtube.com
doc

https://ffmpeg.org/ffmpeg-filters.html#drawgraph_002c-adrawgraph, https://ffmpeg.org/ffmpeg-filters.html#astats-1

There is no explanation in the official document, but the result of this (lavfi.astats.Overall.Max_level) seems to be quite different depending on the version. Uploaded videos are from 4.1.

#! /bin/sh
ifn="Air on the G String (from Orchestral Suite no. 3, BWV 1068).mp3"
ifnb="`basename \"${ifn}\" .mp3`"
pref="`basename $0 .sh`"

#
# `adrawgraph' is a low-level utility, mainly for debugging purposes.
#
"/c/Program Files/ffmpeg-4.1-win64-shared/bin/ffmpeg" -y -i "${ifn}" -filter_complex "
[0:a]astats=metadata=1,asplit[a0][a1];

[a0]adrawgraph=
m1=lavfi.astats.Overall.Max_level:fg1=0x00dd00:
mode=line:slide=rscroll:min=0:max=1.2
,scale=960:1080,setsar=1[v1];

[a1]adrawgraph=
m1=lavfi.astats.1.DC_offset:fg1=0xff0000:
m2=lavfi.astats.2.DC_offset:fg2=0x0000ff:
mode=line:slide=scroll:min=-0.00006:max=0.00006
,scale=960:1080,setsar=1[v2];

[v1][v2]hstack[v]
" -map '[v]' -map '0:a' -c:a copy \
  "${pref}_${ifnb}.mp4"