Alex Balgavy

Just some stuff about me.

Here's my dotfiles repository.

Check out my blog.

My keys: PGP, SSH

My crypto wallets (BTC, XMR)

ffmpeg how to adjust volume of an mp3

Written by John Riselvato - original link

In this section we’ll learn various useful audio filters specifically to audio but all filters will work on video as well. Since this is just an audio section, -af instead of -filter_complex unless multiple audio input sources are required. See question “How to use filters (-vf/-af vs -filter_complex)?” for more details.

As you learn more about FFMPEG, you’ll quick find filters that solve problems in the matter of seconds in terminal vs 5 minutes in GUI software. One example of this is adjusting the volume of an mp3. In the following one-liner, the volume is increased by 10db:

  $ ffmpeg -i input.mp3 -af "volume=volume=10dB" output.mp3

The volume value can also be negative value to decrease the volume as seen in the following example:

  $ ffmpeg -i input.mp3 -af "volume=volume=-10dB" output.mp3

volume
Set the audio volume with input_volume * value = output_volume

volume has over 17 different different parameters that can be chained to precisely change the volume. For more information visit, http://ffmpeg.org/ffmpeg-filters.html#toc-volume