[FFmpeg-user] Increasing audio
barsnick at gmx.net
Sat Apr 1 23:58:31 EEST 2017
On Sat, Apr 01, 2017 at 22:21:04 +0200, Cecil Westerhof wrote:
> I was asked to make videos during a ToastMasters contest. I had
> ordered a microphone for this, but sadly it did not arrive in time. So
> I needed to use the internal microphone from my Canon HS60 SX. Being
> away about ten meters from the speakers, their voices are much to
> soft. So I needed to pump up the audio. I did this with:
> ffmpeg -y -i speaker.MP4 -vcodec copy -af volume=3 speakerAudioInc.MP4
> Is that the correct way, or is there a better way?
> When using 4 there where to much distortions.
If you only want to raise the volume linearly as much as possible
without distorting, you can analyze first:
$ ffmpeg -i speaker.MP4 -vn -af volumedetect -f null -
Look for the volumedetect output, especally this line:
[Parsed_volumedetect_0 @ 0xbd47b80] max_volume: -7.7 dB
You can use then use that value for the volume filter - note the "dB"
$ ffmpeg -y -i speaker.MP4 -vcodec copy -af volume="7.7 dB" speakerAudioInc.MP4
ffmpeg also has a Dynamic Audio Normalizer filter, "dynaudnorm". You
could add this after the volume filter (or instead? not sure - try it)
to dynamically increase the volume on sections which are too quiet.
> There where only windows at one side of the room. So often the faces
> are at the window side overexposed. Is there something I can do about
The "eq" filter can correct brightness, gamma and so on - only
statically, not dynamically. You can experiment with the results on one
frame, and then apply to the whole video.
If it's just one section of your frame which needs correction, you
could cut it out, adjust the cutout (with e.g. "eq"), and re-overlay it
over the original.
More information about the ffmpeg-user