[FFmpeg-user] HELP !

Moritz Barsnick barsnick at gmx.net
Tue Aug 23 18:18:01 EEST 2016


On Tue, Aug 23, 2016 at 19:37:58 +1000, Nicolas Sampson wrote:

> I am not a programmer but I had to use FFMPEG due to the fact that a

Using a command line tool doesn't really have to do with programming,
but yeah, in a way, it may go beyond what many users have done before.

Anyway: In addition to what the others have written, I would like to
add:

> ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a
> 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
> 
> (I am hard of hearing, that is why I doubled the volume)

Raising the volume of videos which are recorded "too silent" is
certainly a good idea - I do it often, silent videos irritate me - but
cannot be generalized. The tool of choice for changing the volume is
usually your player.

The reason I'm saying this: If the maximum volume of your audio is
already above -3 dB (i.e. "1/2"), multiplying it with your "2" will
cause clipping. Clipping implies heavy distortions, which will make it
even worse for you to comprehend the audio.

What you can do is to analyze the audio track:
$ ffmpeg -i mysample.mkv -vn -filter:a volumedetect -f null -

where the filter will give you something like:
[Parsed_volumedetect_0 @ 0x9f3e5e0] n_samples: 9893888
[Parsed_volumedetect_0 @ 0x9f3e5e0] mean_volume: -26.5 dB
[Parsed_volumedetect_0 @ 0x9f3e5e0] max_volume: -10.2 dB
[Parsed_volumedetect_0 @ 0x9f3e5e0] histogram_10db: 25
[Parsed_volumedetect_0 @ 0x9f3e5e0] histogram_11db: 410
[Parsed_volumedetect_0 @ 0x9f3e5e0] histogram_12db: 2297
[Parsed_volumedetect_0 @ 0x9f3e5e0] histogram_13db: 7834

(The astats filter may or may not be better to parse for automation.)

And you can then compensate that insufficient max volume (no more, no
less) with the volume filter:
$ ffmpeg ... -filter:a volume="+10.2 dB" ...

If that's still too silent in most places, you probably need to use a
dynamic filter such as dynaudnorm[1].

> *Otto van Dyke.*
> *If you intend to forward this message, PLEASE delete my address and/or
> details.*

The list server will not really obey, but publicize instead:
http://ffmpeg.org/pipermail/ffmpeg-user/2016-August/033282.html
Just sayin'.

Welcome to ffmpeg,
cheers,
Moritz

[1] https://ffmpeg.org/ffmpeg-filters.html#dynaudnorm


More information about the ffmpeg-user mailing list