I want the loudest peak sound in a movie clip to be as loud as the codec allows, then have every other sound amplified accordingly.

What's a practical example in order to accomplish this using ffmpeg?

link|improve this question
feedback

2 Answers

ffmpeg on its own can't do it. You will have to export the audio stream, normalize it, and sync it back into the video container.

Step 1: Export the audio stream

ffmpeg -i video.avi -acodec pcm_s16le audio.wav

This will create an uncompressed WAV file with just the video's audio part.

Step 2: Normalize it

There are a couple of tools out there:

Refer to the individual manuals on how to use them. Note that using MP3Gain (or the ReplayGain) algorithm is not the right way to do this, as they're not really simply normalizing the files.

Step 3: Merge it back in

Use ffmpeg to merge the audio stream back into the video container.

ffmpeg -i video.avi -i audio.wav -map 0:0 -map 1:0 -vcodec copy -acodec copy video_normalized.avi
link|improve this answer
feedback

You're looking to have the audio 'normalized.'

I found this thread and there's lots of good information in there. Hope it helps!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.