Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Permanently normalize volume when converting lossless to MP3? (Read 11393 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Permanently normalize volume when converting lossless to MP3?

Hello,
After having encoded my full CD library to lossless formats (I started out encoding to APE, but later switched to FLAC), I now would like to convert my favorite tracks to MP3 to play on my portable MP3 player. However, I have since encoding all these songs realized there is quite a difference in sound levels, especially when comparing older CDs to newer ones.
Since all my files are already encoded to lossless formats, I hate to get all the CDs out again and start the process over again, I therefore need to find out a fairly simple way of setting the audio level to a certain number when converting lossless (not ripping CDs) to mp3, so that I can use that same audio level everytime I need to convert a particular track from lossless to mp3. How would I do this? I have tried to find the answer...but I can't. Can someone help out? Please give easy to understand instructions, I am not THAT familiar with computer stuff... Thanks. /Kristiana

Re: Permanently normalize volume when converting lossless to MP3?

Reply #1
You use the foobar2000 player to apply replaygain volume correction info to the lossless files. Then you convert to mp3 using 'replaygain processing' in foobar converter. This gives you volume matched mp3's converted from lossless.

If you already have mp3's without replaygain correction, You can load them into foobar and "apply RG to MP3 DATA".

If not using foobar, you can use mp3gain do do the same : mp3gain *.mp3 or use the mp3gain GUI

Re: Permanently normalize volume when converting lossless to MP3?

Reply #2
Following up on what shadowking said: I don't use Foobar2000, but do use MP3Gain to make all my mp3 more or less the same volume.

You can download it here:
http://mp3gain.sourceforge.net/download.php

In terms of steps, you would need to:
-Convert your lossless files to MP3s
-Run those MP3s through MP3Gain, which will losslessly alter the volumes as needed

There are two different ways to use MP3Gain, track or album, and you may want to use one or the other depending on how you listen to your music. If you tend to put music on random/shuffle play, you may want to apply 'track' gain to your files, and all will be normalized to whatever you set as a target volume. If you tend to listen to whole albums, or want to keep tracks on an album at the same volume relative to each other (as volumes often intentionally vary from track to track), you want to apply 'album' gain to all tracks on the same album at once, and the whole album will be normalized to the target volume while the individual album tracks will still retain their differences in volume relative to each other.



 

Re: Permanently normalize volume when converting lossless to MP3?

Reply #3
Thank you for your replies.
But I don't understand how the replaygain works? This is what I want:
* Pick a few songs from my lossless library and convert them to mp3.
* After the files have been converted to mp3, I want their volume to sound equal.
* Then next time I want to convert some other songs, I want the new converted songs to have the same volume like the earlier ones I converted
* I want the change of volume to be permanent, so that the actual volume levels are increased, not just a "sheet" telling the player how loud to play the files.
Can someone tell me how I do this? I understand I have to apply replaygain to the folders before converting to mp3, but I don't understand how to? How does replaygain know what sound level I want the "normalized" level to be at for all my files? I really don't like those newer songs that the volume is blasting so loud that it almost sounds distorted, I also don't like those 30-year old CDs where the sound is so low. I just want a "normal" sound level. Sorry for my english, i  hope you understand what i mean. /Kristiana

Re: Permanently normalize volume when converting lossless to MP3?

Reply #4
In your case, MP3Gain alone will do just fine. You can do this with the standalone application on the MP3 files after you convert them. The resulting volume levels will be the same every time you use it, since it uses a reference volume level, and makes the loud songs quieter and the quieter songs louder to match this level.

This is probably the version you want: http://sourceforge.net/projects/mp3gain/files/MP3Gain-Windows%20%28Stable%29/1.2.5/mp3gain-win-full-1_2_5.exe/download

Install it, and then the program and tell it to process your MP3 files. You can select track mode if you just want each track to have the same volume level, or album mode if you want complete albums to maintain their levels in relation to each other.

Re: Permanently normalize volume when converting lossless to MP3?

Reply #5
If you want to do it during conversion with foobar2000 then you first need to scan all your files with replaygain.

Then convert -> ... -> load your mp3 profile
then in processing: ReplayGain,
source mode: track if you want to have volume adjusted per track,
processing: apply gain and prevent clipping.
Ok.
Convert.

Test with a few different files first. If volume is too low then use the Preamp sliders in the Processing-ReplayGain window. Keep in mind that you cannot boost to whatever levels you want, because of our earlier "prevent clipping according to peaks" setting.
"I hear it when I see it."

Re: Permanently normalize volume when converting lossless to MP3?

Reply #6
Quote
* Pick a few songs from my lossless library and convert them to mp3.
* After the files have been converted to mp3, I want their volume to sound equal.
* Then next time I want to convert some other songs, I want the new converted songs to have the same volume like the earlier ones I converted
In case it's not clear, MP3Gain doesn't "match a batch of songs", it sets the loudness to a preset target.    So, if you apply MP3Gain to another song later, it will match the previously-processed songs.
 
Quote
* I want the change of volume to be permanent, so that the actual volume levels are increased, not just a "sheet" telling the player how loud to play the files.
MP3Gain, AACGain, and WAVgain all work that way...  They make "permanent" changes to the audio data.      (So, you don't need a compatible player.)

ReplayGain and Apple's Sound Check "tag" the file (Sound Check might use a database) and the volume is adjusted at playback time (with a compatible player that can read the tag).

Re: Permanently normalize volume when converting lossless to MP3?

Reply #7
Ohh, maybe mp3gain will work then. I thought it would worsen the files since they are already lossy and it would have to re-encode them again. But if that is no the case, I will try it
Again thank you everyone for helping me!

Re: Permanently normalize volume when converting lossless to MP3?

Reply #8
Ohh, maybe mp3gain will work then. I thought it would worsen the files since they are already lossy and it would have to re-encode them again. But if that is no the case, I will try it
Again thank you everyone for helping me!

MP3Gain is actually a really clever little program, because it doesn't need to do any reencoding to change the loudness of a file.

In very simplified terms, an MP3 file is constructed from a number of frames containing the encoded audio data. These frames also contain a value indicating how loud this audio should be. MP3Gain goes through the MP3 files and finds both the peak loudness and average loudness. Then it uniformly changes the loudness value of the files, so they end up at a defined average loudness level.

Re: Permanently normalize volume when converting lossless to MP3?

Reply #9
Mp3Gain finds the strongest sample not "peak loudness."

"Average loudness" is also a misnomer. In the case of MP3Gain, it is the 95th percentile that is chosen among 50ms sections of the audio after equal loudness weighting has been applied.

Re: Permanently normalize volume when converting lossless to MP3?

Reply #10
I did say it was in "very simplified terms".

Re: Permanently normalize volume when converting lossless to MP3?

Reply #11
Actually, I have an issue.
I want to convert Youtube videos into MP3 and make the sound more or less equally loud for portable use.
Convert -> Lame --noreplaygain -V7 - %d -> Processing: Replaygain (Track-Apply gain) + Resampler (32 kHz)
But the output has surprisingly no gain, both files even have the same checksum whether Replaygain is set to be used or not.
The current workaround is to add the output to a playlist and manually invoke Replaygain->Apply gain to content…
Why?
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Permanently normalize volume when converting lossless to MP3?

Reply #12
afaict you're talking about foobar2000 functionality.

The default foobar action is to just add Replaygain tags; a lossless process.

foobar would need to have an extra option to allow the user to select ReplayGain-scan output files as tracks AND apply gain to file content when in the Converter > Other > When done window.

I would actually like to see another option in addition to the current one for adding gain as tracks (not just the album mode).

Why is this like this? I don't know. You'd nee to ask @Peter in the foobar2000 forums.

 

Re: Permanently normalize volume when converting lossless to MP3?

Reply #13
The default foobar action is to just add Replaygain tags; a lossless process.

I don’t get, the label in in the conversion dialog says explicitly that files will be altered.
If it means anything other than making files louder (or quieter), then this label is misleading.
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Permanently normalize volume when converting lossless to MP3?

Reply #14
1. you can add Replaygain tags, so that compatible software/hardware will make the necessary volume adjustments.
2. you can apply those Replaygain tags to the actual file thereby altering the file's volume; software/hardware isn't necessary to implement the volume changes.

The image is from process #2 above. It's actually changing the file's data. That means it isn't a lossless process. But it's not lossy in the sense that we tend to understand it; it hasn't re-encoded the audio.

Re: Permanently normalize volume when converting lossless to MP3?

Reply #15
That means it isn't a lossless process.
Usually it is so close to lossless that there is no loss that hadn't already incurred upon mp3 encoding.
Mp3Gain might get a problem if you reduce volume by -212 dB and increase volume by 172 dB according to this post: https://hydrogenaud.io/index.php?topic=34154.msg299025#msg299025

But seriously who does that except out of curiosity or as proof of concept?

Re: Permanently normalize volume when converting lossless to MP3?

Reply #16
2. you can apply those Replaygain tags to the actual file thereby altering the file's volume; software/hardware isn't necessary to implement the volume changes.
I can’t do it during the conversion process, that’s the crux of the issue.
If you read my report in haste, let me repeat, either Apply gain is set or not, it is NOT applied.
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Permanently normalize volume when converting lossless to MP3?

Reply #17
I read your comment just fine. And I responded appropriately:
The default foobar action is to just add Replaygain tags; a lossless process.
Maybe I should've clarified even further: the ONLY gain action during the converter process is to add Replaygain tags; *not* apply it to the actual files.

Why is this like this? I don't know. You'd need to ask @Peter in the foobar2000 forums.
So, you need to direct your question, and presumably a feature suggestion, to the aforementioned developer of foobar2000 in the foobar2000 forums.


Re: Permanently normalize volume when converting lossless to MP3?

Reply #18
You need to scan your source files and store ReplayGain tags in them before conversion. Then the gain will be applied. Only a constant adjustment using the "without" slider can be applied if the source files don't have tags.