Increase Volume of an MKV Video from Linux Terminal

Solution 1:

It isn't very well documented, but FFmpeg has a -vol switch which will allow you to increase volume output.

Example:

ffmpeg -i vid.mkv -vol 512 -vcodec copy output.mkv

Some things to take note of:

  • the -vol switch uses "byte percent", so you can't just specify a 200% volume increase, 100% = 256 so specifying 256 would leave the volume as is, 512 would double it and so on.

Solution 2:

The -vol switch is deprecated I've found this method to be useful currently:

ffmpeg -i input.mkv -vcodec copy -filter:a "volume=5.000000" output.louder.mkv

Adjust the number after volume= to suit your needs.

You can also use decibel measures. To increase the volume by 15dB: ffmpeg -i input.mkv -vcodec copy -filter:a "volume=15dB" output.louder.mkv

The -vcodec copy simply copies the video as is and -filter:a tells ffmpeg to filter the audio. Note that -vcodec can be shortened to -c:v

Sources:

https://trac.ffmpeg.org/wiki/AudioVolume

Testing.