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: lower volume output to prevent clips (Read 36368 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

lower volume output to prevent clips

Can I lower volume output with any command in lame enc 3.97b3 or maybe with RazorLame?

I rip CDs with EAC and later convert the wav to mp3 with latest lame enc 3.97b3/ RazorLame latest version.
Mostly I keep both lossless wav and the lossy mp3 for my mp3 player
When converting the mp3 file back to wav to see if it created any vol clips in Sound Forge, I allmost always get volume clips when using clip detection.

Don't want to normalize, only lower the vol!
Easy done with Volume in SoundForge but I do not want to rip the CDs with SoundForge coz it isn't secure as EAC.

Know that EAC and dbPowerAmp has this but I rather not use it coz I always get better results with RazorLame.

I just need to lower the volume on the final mp3 by 0.4 - 0.6dB / about 94 - 95%, I do not want to change the original wav files.


Hope someone can tell me whats the easiest way to do this process.

lower volume output to prevent clips

Reply #1
You can use mp3gain for that. Volume can be changed in 1.5 dB increments, IIRC, and it gives you indication about clipping or not. To do what you want you can use its "Apply Constant Gain" function, but you can also take into consideration the possibility to normalize your albums at "standard" average level of 89 dB using the "Apply Album Gain" function.

BTW, volume changes made by mp3gain are "lossless", that is it doesn't imply a transcoding. It just fiddle with some parameter into the mp3 frames and the changes you make can be reverted.

Cheers.

Sergio
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #2
I'd just use foobar2000 to decode MP3s, with RG applied, no preamp, and clipping prevention on.

PS. If you don't want RG attenuation, choose source mode: none, and processing: prevent clipping according to peak. You'd still have to scan the files for RG info, though.

lower volume output to prevent clips

Reply #3
tried that one.
But I need to change the wav file before converting to mp3.

I see no point in changing the final mp3 file,


If you use mp3gain, then you still have the clip but on a lower volume output.
The wave is still cut, the more you keep under that limit the more of the original sound you can save.


about clipping prevention in foobar:
this changes the file, limits the output.



to put it simple, I want to keep as much of the original structure as I can

lower volume output to prevent clips

Reply #4
I process my MP3 albums (which I convert from my lossless archive) with MP3gain's "Maximum no-clip album gain" option. It keeps the relative track volume levels inside each album correct and prevents the tracks from clipping with all decoders (HW or SW).

With modern compressed pop/rock music it mostly changes the overall album level -1.5 dB. Sometimes -3.0 dB or even -4.5 dB is needed. I don't use the "undo tags" option since there's no reason to make the files to clip again. After that I analyze the files with foobar for creating the standard replay gain tags so I can choose between the album and track gain modes on PC playback.

lower volume output to prevent clips

Reply #5
In your first post you said that:

Quote
When converting the mp3 file back to wav to see if it created any vol clips in Sound Forge, I allmost always get volume clips when using clip detection.
This can be a sign of clipping due to the mp3 decoding process. The solution I suggest will solve this issue.

If instead the clipping is already in the original wav, as it was ripped from the CD, then blame the mastering engineer and... there is nothing to do. Nobody will give you back information that is not available in the first place. You can lower the wav volume using WaveGain (available at http://www.rarewares.org/others.html), but that yes, will just lower the level of the clipped parts without "regenerating" them (an impossible process from a deterministic point of view, at most some program can exist to extrapolate interpolate the missing values).

Sergio
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #6
I know, but as I said before, I rip the CDs with EAC to wav.
Ofcourse I have checked the original file.

The issue is, when encoding, clipping will be a fact if the original wav file is on max vol output/ 100%.

try and you will see

the sound wave changes and that change creates the clipping.
there is no point of removing clips if the clips are there.

I want to prevent clips.

I can do this with SoundForge I just need to make this process faster or automatic somehow

lower volume output to prevent clips

Reply #7
tried that one.
But I need to change the wav file before converting to mp3.

I see no point in changing the final mp3 file,


If you use mp3gain, then you still have the clip but on a lower volume output.
The wave is still cut, the more you keep under that limit the more of the original sound you can save.


about clipping prevention in foobar:
this changes the file, limits the output.



to put it simple, I want to keep as much of the original structure as I can


MP3 files have correct unclipped waveform before decoding even the standard decoding process makes clipped 16-bit pcm output. MP3Gain (or e.g. foobar2000's replay gain) can change the volume level before decoding to 16-bit integer so that the decoded files remain unclipped (only the volume level is a bit lower).

lower volume output to prevent clips

Reply #8
I know, but as I said before, I rip the CDs with EAC to wav.
Ofcourse I have checked the original file.

The issue is, when encoding, clipping will be a fact if the original wav file is on max vol output/ 100%.

try and you will see

the sound wave changes and that change creates the clipping.
there is no point of removign clips if the clips are there.

I want to prevent clips.

I can do this with SoundForge I just need to make this process faster or automatic somehow

I perfectly know what you mean, believe me, man. The problem is in the decoding part of the process. You try, you then tell!   

Cheers!

Sergio

Edit: BTW, if you don't trust me, just try to search the forum (always a good idea). This issues has been already debated several times and the solution already offered several times.
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)


lower volume output to prevent clips

Reply #10
ok :S
The sound wave gets destroyed when you increase the vol "over the top" on a original wav file.
You can't get that back as it was when lowering back the volume.
So how am I gonna do it on a mp3 file if I can't on a wav file

As I said, I want to prevent clipping not edit the mp3 file in anyway, even if I do not need to re-encode it

I just need to make the process faster or automatic somehow.

When ripping a CD, I do not want to touch the final mp3 file, just play it

lower volume output to prevent clips

Reply #11
The CDs either have clipping or they don't. You can't do anything about that.

The MP3s either have clipping or they don't. You can't do anything if it inherited clipping from the CD.

You can do something if there wasn't any clipping on the CD. You can turn down the volume at decode-time (or use MP3Gain) and you'll get unclipped output.

That's what people are trying to tell you.

lower volume output to prevent clips

Reply #12
ok :S
The sound wave gets destroyed when you increase the vol "over the top" on a original wav file.
You can't get that back as it was when lowering back the volume.
So how am I gonna do it on a mp3 file if I can't on a wav file

As I said, I want to prevent clipping not edit the mp3 file in anyway, even if I do not need to re-encode it

I just need to make the process faster or automatic somehow.

I'm tempted to give up... 

case of where_is_it_clipped:

A) in the original, that is on the pressed CD. Do you think that can be a solution for that? NO!

B) in the process of encoding/decoding to/from mp3. By the heck, it is in the D_E_C_O_D_I_N_G (can you hear me?) part of the process an NOT (by definition) in the encoding.

mp3gain alters the "global gain" field of each mp3 frame so that it doesn't clip any more when (you guess when?) D_E_C_O_D_I_N_G.

Sergio
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #13
Adding --scale .95 to the LAME command-line parameters should do the trick.

lower volume output to prevent clips

Reply #14
You can do something if there wasn't any clipping on the CD. You can turn down the volume at decode-time (or use MP3Gain) and you'll get unclipped output.

No, just turning the volume down will not prevent clipping, it will just lower the volume of the clippings.

What moneo suggested (to use --scale 0.95)  can do the trick, but you can't be sure 100% and besides that it alters the original (as probably SoundForge does) and personally I don't like that. I prefer lossless alterations, and for a reason, I think.

Sergio
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #15
OK, I should have said "You can turn down the volume using RG...".

No, just turning the volume down will not prevent clipping, it will just lower the volume of the clippings.

On second thought, I don't think that's true. The MP3 format is in floating point. Keep lowering the volume and the peaks will come down to less than the maximum integer peak.

lower volume output to prevent clips

Reply #16
OK, I should have said "You can turn down the volume using RG...".


Oh, yes! That yes!  Sorry for the misunderstanding. In fact it is what I do. Just store ReplayGain information in the ID3v2 tags (not even alter the "global gain field") and use foobar or winamp with otachan plugin for listening without clipping. Anyway recently I bought a DAP and I'm now tempted to move to the "global gain" field solution, so that even my DAP doesn't clip...

Cheers!

Sergio
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #17
What Moneo suggested works if the original wav file has no clipping.
Thanx Moneo !!!
smz, I know what you mean but the original wav I have tried with has no clipping and I do not want to create clipping in the mp3 file of a wav that does no have clipping 


When playing a mp3 it gets decoded while playing.

If I encode a orignal wav file (that doesn NOT have clipping) to a mp3 file (256) and decode that mp3 to a new wav file with the same lame.
How can the mp3 have no clipping and the decoded file have when in the end of the play or decode process you will have the same audio

lower volume output to prevent clips

Reply #18
On second thought, I don't think that's true. The MP3 format is in floating point. Keep lowering the volume and the peaks will come down to less than the maximum integer peak.


It depends on where the volume adjustment is done. If it is embedded in the mp3 decoder, that can be true. If you just use the kmixer... the clipping is already there. I don't know if any player act at the decoding level for volume adjustement, but I don't think so. I may be wrong, though...

Sergio

Edit: fixed a mess that I mad trying to answer to another post.


If I encode a orignal wav file (that doesn NOT have clipping) to a mp3 file (256) and decode that mp3 to a new wav file with the same lame.
How can the mp3 have no clipping and the decoded file have when in the end of the play or decode process you will have the same audio

Would you please invest some of your time and give a try to the solution I suggested?


The FACT is that there is no clipping in the mp3 itself. The clipping is generated at (you guess when?) D_E_C_O_D_I_N_G time.

Sergio

EDIT:
What the heck... I can't post a new answer.. everything goes inside this one... sorry.. don't know what's going on. This is an answer to two different post, thus...
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #19
hehe, maybe soon if I do not find a solution

I am unsure of what Moneo suggested really will do the trick.

If I lower the vol (do as Moneo said) and the clipping doesn't occur in the decoded file.
Will the sound wave be prevented to go over that scale, and if so, the wave that normally woudl go over is it cut?

lower volume output to prevent clips

Reply #20
hehe, maybe soon if I do not find a solution

You have alredy been offered a solution  but you can't understand it and you are unwilling to even try it. Too bad for you. You'll not be very apreciated in this community with this kind of attitude.
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #21
ok :S
The sound wave gets destroyed when you increase the vol "over the top" on a original wav file.
You can't get that back as it was when lowering back the volume.
So how am I gonna do it on a mp3 file if I can't on a wav file

As I said, I want to prevent clipping not edit the mp3 file in anyway, even if I do not need to re-encode it

I just need to make the process faster or automatic somehow.

When ripping a CD, I do not want to touch the final mp3 file, just play it

As said, you could use the scale switch with LAME encoder. Values like 0.93 and 0.95 have been recommended, but that is not always enough with the worst examples of over-compresssed recordings. For example, the test track in my screenshot needs something like 0.75 (this depends on the other encoding settings too).

You could analyze the files after encoding with foobar's replay gain, check how much they clip (if at all) and pick the most clipped file, then make a couple of more encodings with estimated scale switch values for finding the highest value that prevents from clipping and finally encode all files again with this value. This is a lot of work.

IMHO, the easy and reliable method is to load the files to MP3gain and let it batch process them to "Maximum no-clip album gain". As I said, this prevents the files from clipping with any decoder. MP3gain does not transcode, it just adjust the volume level. MP3 files are always already altered from the original source and this change can only make them better (IMHO again).

The "clip-prevented" files" can be analyzed for replay gain tags afterwards. Replay gain tags can be used in addition for making the usual playback options available (track or album gain, gain adjustments etc).

lower volume output to prevent clips

Reply #22
come on, I was offered a solution I probably do not agree with 

If someone ask you a question and you feel you know the answer but the one that asked it doesn't agree, is that really a solution.
Can and can not be...

Btw I do not think no one will remember me here anyway

I just want to consider other options, easier

Ok I'll be nice and and ask a new easy question.
Does anyone know any vol tool that does the same thing as Volume in SoundForge.
example, you have 10 wav files you have ripped with EAC and all the wav files you want to lower the vol by 0.5-0.6dB (and ofcourse keep the original as before and but make the new wav files with the desired lowered vol.)

lower volume output to prevent clips

Reply #23
ok :S
The sound wave gets destroyed when you increase the vol "over the top" on a original wav file.
You can't get that back as it was when lowering back the volume.
So how am I gonna do it on a mp3 file if I can't on a wav file



Background

With fixed point data, 0dB FS, or “digital full scale” is the largest value you can store - anything bigger will be clipped to that largest possible value.

With floating point data, 0dB is normally defined somewhere near the middle of the possible range. With audio data, typical 32-bit floating point representation gives you over 1000dB range - a lot of space above conventional 0dB FS


So the answer to your question is this: because .wav files from CDs are fixed-point data (16-bit integers), while mp3 files are floating point data.

This particular floating point data is (nearly) impossible to clip. The headroom is amazingly large (at least 100dB more than you need).

mp3s are normally decoded to fixed point data (typically 16-bit integers), though other options are available.


The solution you have been given does work. Try it.


Otherwise, just add the --scale 0.9 switch to lame.

(FAQs and manuals are great things!)

Cheers,
David.

lower volume output to prevent clips

Reply #24
ok ok, I am gonna try but have I understood it correct, you all sayin I do not need to lower the vol at all?