Adjust Audio Volume with FFmpeg Volume Filter
This article explains how to use the FFmpeg volume
filter to modify the audio levels of your media files. You will learn
how to increase or decrease volume using multiplier values, adjust
volume precisely using decibels (dB), and apply these filters to video
or standalone audio files with quick command-line examples.
To adjust volume in FFmpeg, you use the audio filter flag, written as
-filter:a or abbreviated as -af, followed by
the volume filter and your desired value.
Adjusting Volume with Multipliers
You can scale the audio volume by multiplying the original signal.
Halve the volume (50% of original): Use a multiplier of
0.5.ffmpeg -i input.mp3 -filter:a "volume=0.5" output.mp3Double the volume (200% of original): Use a multiplier of
2.0.ffmpeg -i input.mp3 -filter:a "volume=2.0" output.mp3
Adjusting Volume with Decibels (dB)
For more precise logarithmic control, you can specify the change in decibels (dB).
Increase volume by 6 dB:
ffmpeg -i input.mp3 -filter:a "volume=6dB" output.mp3Decrease volume by 10 dB:
ffmpeg -i input.mp3 -filter:a "volume=-10dB" output.mp3
Adjusting Audio Inside a Video File
When adjusting the audio of a video file, you can copy the video
stream directly without re-encoding it. This saves processing time and
preserves the original video quality. Use the -c:v copy
option to achieve this:
ffmpeg -i input.mp4 -filter:a "volume=1.5" -c:v copy output.mp4