Update: Thanks to @furicle for this suggestion. I think it's about perfect:
tmp $ AV_LOG_FORCE_NOCOLOR=true ffmpeg -hide_banner -i example.opus -filter:a volumedetect -f null /dev/null
Input #0, ogg, from 'example.opus':
Duration: 02:13:19.89, start: 0.007500, bitrate: 118 kb/s
Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp
Metadata:
encoder : Lavf58.45.100
[Parsed_volumedetect_0 @ 0x563ea07eeb00] n_samples: 0
Stream mapping:
Stream #0:0 -> #0:0 (opus (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to '/dev/null':
Metadata:
encoder : Lavf61.7.100
Stream #0:0(eng): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
encoder : Lavc61.19.101 pcm_s16le
[Parsed_volumedetect_0 @ 0x7f9920003c00] n_samples: 767987856
[Parsed_volumedetect_0 @ 0x7f9920003c00] mean_volume: -21.0 dB
[Parsed_volumedetect_0 @ 0x7f9920003c00] max_volume: -2.8 dB
[Parsed_volumedetect_0 @ 0x7f9920003c00] histogram_2db: 1
[Parsed_volumedetect_0 @ 0x7f9920003c00] histogram_3db: 70
[Parsed_volumedetect_0 @ 0x7f9920003c00] histogram_4db: 3872
[Parsed_volumedetect_0 @ 0x7f9920003c00] histogram_5db: 98331
[Parsed_volumedetect_0 @ 0x7f9920003c00] histogram_6db: 750534
[out#0/null @ 0x563ea084bf80] video:0KiB audio:1499976KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
size=N/A time=02:13:19.87 bitrate=N/A speed= 573x
Dear sound/audio folks and engineers,
[Update: just for clarity: I'm looking for a command line utility that will help me decide which of 70 audio recordings need amplification/compression/normalization. Something that can print out media stats like average loudness, or something like that]
I have a directory with 3.5GiB of audio files (chiefly opus & m4a) which are spoken word recordings.
Some of them are quite low, and some of them are quite dynamic such that it's a whisper at times and nearly a shout at other times.
I've processed a lot of them with #audacity's compressor filter or #ffmpeg (ffmpeg -i audio.m4a -filter:a "speechnorm=e=50:r=0.0001:l=1" audio-normalized.m4a
), but there are some unprocessed files in the collection, which are a pain to individually find and fix.
Is there a way from the #CommandLine to detect the loudness and/or dynamic range of audio files so that I can automatically flag them for processing with ffmpeg?
Thanks!!
#audio #sound #SoundEngineering #AskFedi #HiveMind