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: 28th February 2021
First published: 16th August 2018

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch