hi

there are many options in ffmpeg including copy stream and most types of file formats if you have the codec

ffmpeg -codecs
will list what is loaded, my system reports for "ffmpeg -codecs | wc -l" is 421
also the included help "ffmpeg -h full | wc -l" is 8765

there are many web sites devoted to selecting the right set of options
and a revised version of the script below

Steve

On 28/06/17 20:06, Russell Coker wrote:
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 
<[email protected]> 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 $tx.mp3
ffmpeg -i $1 -an -c copy $tx.m4a
normalize $tx.mp3
ffmpeg -i $tx.m4a -i $tx.mp3 -vcodec copy $tx.n.m4a
rm $tx.mp3
rm $tx.m4a
mv $tx.n.m4a $tx.m4a


------------------------------------------

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
[email protected]
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

_______________________________________________
luv-main mailing list
[email protected]
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

Reply via email to