Increasing volume on a video

I was asked to improve the volume of a home video (to be merged with others into a congratulatory video). Thanks to the magic of the internet, I found out how to do so using ffmpeg!

Step 1: extract the sound into a .wav file, with increased volume.
(source on how to do this)
Default sound level for ffmpeg is 256. Increase that (e.g. to 2048) to get more sound.
Example for a video file called input.mp4:

ffmpeg -i input.mp4 -vn -vol 2048 audio.wav

Step 2: merge the original video with the new sound.
(source on how to do this)
You want to merge the two, and you’ll have to select which video and which audio stream should end up in the output file. Without further ado:

ffmpeg -i input.mp4 -i audio.wav \
-c:v copy -c:a aac -strict experimental \
-map 0:v:0 -map 1:a:0 output.mp4

Tadaa! output.mp4 now holds the combined video+audio.

Comments are closed.