drawtext with signalstatsΒΆ

Watch on youtube.com
doc

https://ffmpeg.org/ffmpeg-filters.html#drawtext-1, https://ffmpeg.org/ffmpeg-filters.html#signalstats-1

see also

drawtext

#! /bin/sh
ifn="Pexels_flowers.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"
#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]signalstats,
drawtext='fontsize=120:fontcolor=white
:text=YAVG\=%{metadata\:lavfi.signalstats.YAVG}':x=400:y=500,
drawtext='fontsize=120:fontcolor=white
:text=UAVG\=%{metadata\:lavfi.signalstats.UAVG}':x=400:y=600,
drawtext='fontsize=120:fontcolor=white
:text=VAVG\=%{metadata\:lavfi.signalstats.VAVG}':x=400:y=700
[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"