
On 28/06/17 01:11, Russell Coker via luv-main wrote:
Is there a way of balancing loudness of different mp4 files? While it's impossible to do this perfectly (there is no general agreement on how to measure it) it is possible to give a good approximation.
My music video collection that I downloaded from youtube has videos of significantly different loudness, so when I watch a selection of videos that suit my mood with mplayer I have to change the system volume every few videos because I get to one that's either too loud or too quiet for the current settings.
I'd like to run a script across my video collection to get the average loudness of each video so the mplayer softvol setting can be adjusted to compensate. Then of course I'd do some manual adjustment like increasing the volume of The Divinyls and The Angels.
hi something like this should do it ------------------------------------------ #!/usr/bin/bash vid=$1 tx=${vid%.*} ffmpeg -i $1 -vn -b:a 256k $tx.mp3 ffmpeg -i $1 -an $tx.mkv normalize $tx.mp3 ffmpeg -i $tx.mkv -i $tx.mp3 $tx.n.mkv rm $tx.mp3 rm $tx.mkv mv $tx.n.mkv $tx.mkv ------------------------------------------ normalize is a package in rpmfusion-free for Fedora users first ffmpeg removes the video next ffmpeg removes the audio final ffmpeg put it back together Steve