Making mp3 louder than it is

Hii,

I would like to know how to make mp3 louder ? some of the mp3 i have recorded is too soft, i can’t hear it when i am working. I have a habit of listen to mp3 recording , be it audio book or talks.
But some of the recorded is just way soft…to be heard when i am doing work. Some of them are fine, loud enough.
Is there way to solve this problem ?
I have briefly browsed thru internet, and found this :
https://www.linux.com/news/adjusting-mp3s-mp3gain/
I wonder if anybody have used this , is it safe or is there any other that is better to use ? Or can i use audacity for the purpose ?

Thanks

ffmpeg can do this. Here is an easy to follow website: https://www.maketecheasier.com/normalize-music-files-with-ffmpeg/

An example command to raise the volume 50% would be:
ffmpeg -i input.flac -filter:a "volume=1.5" output.flac
25% would be:
ffmpeg -i input.flac -filter:a "volume=1.25" output.flac

I have used Audacity before to do this as well.

6 Likes

was just gonna mention Audacity :point_up_2:

3 Likes

I can highly recommend MP3Gain, at least on Windows – haven’t tried using it in Linux. I don’t see why it wouldn’t work the same exact way though! Never lost any audio quality and it can easily level an entire library. Music or audio books.

Lost my music library due to a failed hard drive a long time ago, never bothered to get a new CD Drive to rip and convert everything. So, wasn’t a chance for me to try it on Linux.

One thing I can recommend for a little better clarity is the following:

Enable High Quality Audio

It won’t increase the volume but the sound quality is noticeably better.

2 Likes

I was thinking of this software, but i have not locate a version for linux… where could it be ? can’t locate it on http://mp3gain.sourceforge.net/
it is this one ? https://github.com/elfchief/mp3gain

I don’t know why i felt like this is the ONE, maybe because the name of it… since it named mp3gain!! :rofl:

1 Like

Search the AUR and you shall be rewarded :mage:

6 Likes

Bookmarked. Thanks.

Pudge

2 Likes

I don’t know will anybody ever read this post or not , since the thread has closed.

I have tried ffmpeg to make “church recording” louder some of the mp3 that is too soft to be listen on hp when i am working . I tried to make the few mp3 louder using:
ffmpeg -i abc.mp3 -filter:a "volume=2" output.mp3
I tried to listen it on pc, only a little bit louder than the original.
When i listen again using hp at work, i realized i have ffmpeg the wrong files.

It is hard to tell the volume different, because on my pc, all are loud, but on hp, the loudness varies quite a lot, especially when i am working outside (can’t hear clearly, a bit too soft)

Hence, wanna ask is there way to know the decibel of each audio ? it will act like a “sound level meter” so that i know which audio is indeed softer and after i ffmepg it, how loud (db) did it become… so that i won’t made mistake again in the future.

Thx

What music player are you using? Also what audio devices? You likely have low audio because your output is either too low or your device (headphones or speakers) may need a better interface for good listening volume.

Generally i havent had audio issues in linux for years but you MAY have a situation that ALSA has your default volumes set too low, but without knowing what you have i cant really say.

I recommend against just boosting the gain on the MP3 because if its properly mastered you will likely push it into clipping which isnt higher quality youre losing data and its just louder

1 Like

I am using maple JB player in android phone. I dont know what audio device. I have many recording fr a set if recording, all are loud, only 2 that are too soft to be heard clearly when outdoor.

ok so youre having audio output issues on an android device? Sounds like thats how theyre mastered and when you push the gain youre going to push them into clipping

When the audio clips you lose information, its just louder for no reason. You can try and use some sort of android audio mods or a different player that lets you boost the output gain but you should avoid actually modifying the MP3 gain

You can use ffmpeg for that.

ffmpeg -i input.mp3 -filter:a "volume=1.25" output.mp3

This will increase the volume of input.mp3 (obviously, replace with the actual file name) by 25% (i.e. multiply by 1.25, multiplying by a number less than one will decrease the volume).

You can also use dB (decibels) to specify volume:

ffmpeg -i input.mp3 -filter:a "volume=5dB" output.mp3

You can also use "volume=-5dB" to decrease the volume.

Beware of clipping, which is an ugly distortion in the sound brought about by increasing the volume above the maximum that the waveform can hold. Clipping is destructive, so when you increase the volume beyond what is good, decreasing the volume will not fix the issue. Thus, save your input file.

EDIT: By default, ffmpeg somewhat prevents clipping, so it should not increase the volume by more than it should (though, upon testing, I’ve had mixed results).

If you want to force clipping you can override this safety behaviour:

ffmpeg -i input.mp3 -filter:a "volume=50:replaygain_noclip=0" output.mp3

This will probably create lots of noise in the output file :frog:

EDIT2: To see how much it is safe to increase the volume you can run:

ffmpeg -i input.mp3 -filter:a volumedetect -f null /dev/null

It will give you the mean and max volume in dB. If max_volume is less than 0 dB, you can increase it. For example if max_volume is -5 dB, you can increase up to 5 dB (though you might want to do a bit less than that) using the volume filter above, e.g:

ffmpeg -i input.mp3 -filter:a "volume=4dB" output.mp3

id say to use Audacity because it can actually let you see if the MP3 is clipping or not

Here is an example of audio that isnt clipping, there are some parts edging on or into clipping but its meant to as an 8bit commodore track

This is what happens when you just boost the gain 7db

clipping very literally destroys information, if you use audacity it will let you boost the audio but prevent it from going into clipping unless you allow it You want the volume to stay under 0db and ideally under -1db unless its explicitly meant to go to that range. -1db can be ear blisteringly loud when you account for the output devices amp and such

I just looked into it, by default, ffmpeg prevents clipping, so it simply won’t increase the volume by more than it should. So no need to worry about it. Sorry for the confusion.

you still want to keep it under a certain amount, if its already in the -5db range youre getting close to the edge of what is generally ok for pre output gain

If you are really worried about coming close to clipping, you can analyse the audio file with

ffmpeg -i input.mp3 -filter:a volumedetect -f null /dev/null

It will give you the mean and max volume in dB. If max_volume is less than 0 dB, you can increase it. For example if max_volume is -5 dB, you can increase up to 5 dB using the volume filter (though you might want to do a bit less than that, like @Echoa suggests) , e.g:

ffmpeg -i input.mp3 -filter:a "volume=4dB" output.mp3

Of course, if you want fine control via GUI, you can use Audacity or some other audio editor. But for simple edits like this, ffmpeg is much more convenient.

I have used this
ffmpeg -i input.mp3 -filter:a “volume=2” output.mp3
but the increase in gain is so minute, hardly notice diff…

Please post the output of:

ffmpeg -i input.mp3 -filter:a volumedetect -f null /dev/null

where the input.mp3 is replaced by the actual filename of the unedited file.

Specifically, the number next to max_volume and mean_volume. The rest is not important.