Is there a plugin I'm missing that allows me to determine the volume samples over the length of an audio file?
For example, a sample of every second to gain the dB vs timestamp?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityThe ebur128
filter provides info in terms of the Loudness Recommendation EBU R128 metric.
The astats
filter can provide this info, in terms of dBs:
ffmpeg -i in.mp3 -af astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Overall.RMS_level:file=log.txt -f null -
This produces an output like this:
frame:221 pts:226304 pts_time:4.71467
lavfi.astats.Overall.RMS_level=-67.437152
frame:222 pts:227328 pts_time:4.736
lavfi.astats.Overall.RMS_level=-67.159036
frame:223 pts:228352 pts_time:4.75733
lavfi.astats.Overall.RMS_level=-63.862748
frame:224 pts:229376 pts_time:4.77867
lavfi.astats.Overall.RMS_level=-63.666815
If this is too fine-grained in terms of temporal resolution, increase the reset value which is the frame count for the filter's sampling frequency. For a 1-second slice, an integer approximating audio sampling rate/1000
should be used.
ffmpeg -i mywav.wav -af astats=metadata=1:reset=44,ametadata=print:key=lavfi.astats.Overall.RMS_level:file=gains.txt -f null -
this is my input. It doesn't matter if the input file is wav or flac or mp3 or wathever.
-af asetnsamples=44100,astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Overall.RMS_level:file=log.txt