Programster's Blog

Tutorials focusing on Linux, programming, and open-source

FFMPEG - Change Audio Level In Video

Today a colleague sent me a screen-capture tutorial on using a new system. Unfortunately their microphone was way too quiet for me to hear anything so I needed to find a way to boost the audio level of the video without wanting to reduce the quality of the video.

Using FFmpeg we can re-encode just the audio to increase/decrease the audio level without re-encoding the video, which means that we won't lose video quality, and the process will be really quick. Here are the commands to do so:

Increase Audio Level

ffmpeg \
  -i $INPUT_FILE \
  -vcodec copy \
  -af "volume=10dB" \
  $OUTPUT_FILE

Decrease Audio Level

Exactly the same as before, just use a - sign.

ffmpeg \
  -i $INPUT_FILE \
  -vcodec copy \
  -af "volume=-10dB" \
  $OUTPUT_FILE

Obviously you can change 10dB to be any integer, such as 20dB, depending on your needs.

References

Last updated: 3rd February 2019
First published: 16th August 2018