POV-Ray : Newsgroups : povray.off-topic : ffmpeg and normalizing audio volume : ffmpeg and normalizing audio volume Server Time
2 Jul 2024 22:47:18 EDT (-0400)
  ffmpeg and normalizing audio volume  
From: Doctor John
Date: 7 May 2016 08:14:27
Message: <572ddc23$1@news.povray.org>
I've got approximately 40 GB of music files sitting on one of my boxes;
all under the top directory of ~/Music but then split into many other
sub-directories (as well as sub-sub-directories etc). Unfortunately,
since I got them from several sources, their relative volumes are all
over the place. If I play, for instance, Joan Osborne's 'One of Us' at a
reasonable volume and then follow it with The Stranglers' 'Always the
Sun', I get blown out of my chair by the sheer air pressure emanating
from my sub-woofer. I therefore need to normalize all my files - a mixed
bag of mp3s, oggs and flacs.
The slow way of doing it is to detect the maximum volume of each file
with 'ffmpeg -i example.mp3 -af "volumedetect" -f null /dev/null', note
the maximum volume (e.g. -10 dB) and then correct it with 'ffmpeg -i
example.mp3 -af "volume=10dB" example.mp3'.
Can anyone familiar with ffmpeg think of a way of scripting this so that
I don't have to manually re-encode every individual file?

BTW I'm using bash on a linux box.

John
-- 
Protect the Earth
It was not given to you by your parents
You hold it in trust for your children


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.