Thanks for the suggestion, I will have to investigate that normalise package. But I don't want to rewrite the mp3 or m4a part as they are lossy compression and will lose quality. So I want to get MPlayer to adjust it at playback time. But I might do that for the collection of mp3 and m4a files I have on my phone. My phone speakers don't give the best quality anyway. ;) On 28 June 2017 5:20:07 pm AEST, Steve Roylance via luv-main <luv-main@luv.asn.au> wrote:
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 _______________________________________________ luv-main mailing list luv-main@luv.asn.au https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main
-- Sent from my Nexus 6P with K-9 Mail.