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: is there a advantage to decompress mp3 encoded to wave with lame? (Read 3903 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

is there a advantage to decompress mp3 encoded to wave with lame?

Hi
may I ask a silly question?

I'm used to encode and many time rip too my cds with foobar2000 and lame 64bit LAME 3.100.1 , even some online store do sell flac or mp3 with older version of lame like Lame3.99 never understood
well i use foobar to decompress mp3 to wav
i have created a cusom lame to decode with "-S --decode - %d" or "-S --decode %d"

is there a advantage to decompress mp3 encoded to wave with lame?
before posting i have searched and it's a non sense ,but i have read in other forum that several users do use lame to do it ,
thanks in advance

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #1
All the effort for MP3 goes into the encoding.  Different encoders may produce differences in the resulting MP3.

Given any particular MP3, decoders should produce near enough identical output – so no, it doesn't matter what you use to convert MP3 back to WAV.

What is important is not to perform compression multiple times.  If you are starting with a MP3, keep it as an MP3 and don't convert that to a WAV and then something else (MP3, OGG, ...).  If you want to edit the audio you'll need it to be WAV, so start with the original rip if possible.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #2
All the effort for MP3 goes into the encoding.  Different encoders may produce differences in the resulting MP3.

Given any particular MP3, decoders should produce near enough identical output – so no, it doesn't matter what you use to convert MP3 back to WAV.

What is important is not to perform compression multiple times.  If you are starting with a MP3, keep it as an MP3 and don't convert that to a WAV and then something else (MP3, OGG, ...).  If you want to edit the audio you'll need it to be WAV, so start with the original rip if possible.
hi
well but about "different mp3 encoders " i know lame and an outadated Fraunhofer
well so it's no sense decode with lame to wave mp3 files encoded all with lame,for what i do understand
thanks appreciate it a lot

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #3
Hi,
why do you want to decode your MP3 files? If it is just for playback then there is no need to do so. There is no quality advantage in playing a file that has been decoded in advance over playing the MP3 directly.

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #4
Hi,
why do you want to decode your MP3 files? If it is just for playback then there is no need to do so. There is no quality advantage in playing a file that has been decoded in advance over playing the MP3 directly.
Hi Sunhillow
because I want to burn some cds
thanks

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #5
you can burn your CDs, it will make no difference quality wise and your burner might even decode before it burns the disc

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #6
Others may want to challenge the following, and maybe rightfully so:
I suggest you use a decoder that can apply ReplayGain information upon decoding (that is, change the volume in the course) - in case the encodes have peaks >0 dBFS, as that could clip. And it has been demonstrated: https://hydrogenaud.io/index.php/topic,82112.msg713723.html#msg713723
(Also if you just make a "mixtape" CD of different tracks from different albums, you may find it beneficial to get them to the same volume. I'd limit according to peak, but whether you want to use gain figures is up to you, and also whether you want to use "track" or "album" information.)

Longer story:
MP3 is "defined in terms of the decoding", so if you have a compliant file, all decoders should produce the same audio. They may not be bit-identical, due to different floating-point operations causing different round-offs, but that is accepted; after all, who cares if a 16 bit signal encoded to MP3 would "get the 26th bit rounded off the wrong way".
Now there are also other issues to take care of, for example gaplessness, but on LAME encodes that should be fine with both this and that decoder (I hope?).
But, being a floating-point format, it could exceed "digital full scale". Since encoders are basically free to do whatever they like with the audio, they could even boost volume. And then it could clip upon conversion to an integer format.

Now, not all clipping is any troublesome - if an encoder actually keeps the volume, then a peak past 0 dB is just an encoding artefact, and nothing says it is even worse limiting it. But by and large, I would think clipping protection is ... just fine.

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #7
is there a advantage to decompress mp3 encoded to wave with lame?

Actually yes, but only if the MP3 files were also encoded by LAME. It has nothing to do with sound quality itself (well, that depends on how you define it, I suppose).

For technical reasons, all MP3 files have a delay added to them during the encoding phase, and the exact amount of delay depends on the encoder (scroll down to "ENCODER DELAY AT START OF FILE:"). During decoding, if LAME detects that the MP3 file was encoded by it (via the presence of the LAME tag), it will undo its own delay introduced during encoding, restoring the original timing sample-perfectly. It obviously can't do this for MP3 files encoded by some other encoder, because there's no way to know what the added delay was.

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #8
Decoding/converting an MP3 to an integer WAV can introduce clipping. This is quite common with a lot of music, which peaks around 0dB from the start.

I believe most apps just convert to 16bit without telling you anything about the clipping. And it's probably not a huge problem in practice...
But the correct way is to decode the MP3 to 32bit float and then lower the volume if you need a 16bit file. Or apply ReplayGain during conversion, as Porcus said.

(Clipping is also an issue when encoding to MP3 and not all apps/encoders behave the same way.)

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #9
I suggest you use a decoder that can apply ReplayGain information upon decoding (that is, change the volume in the course) - in case the encodes have peaks >0 dBFS, as that could clip. And it has been demonstrated: https://hydrogenaud.io/index.php/topic,82112.msg713723.html#msg713723
But in this example there is no demonstration that mp3 decoded to 16 bit without normalizing is audibly different to original (not anyhow processed)  lossless source solely due to clipping.

So, can someone give an example where mp3 decoded to 16 bit is audibly different to lossless source and audible differences are caused by clipping, not by other artifacts?

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #10
So, can someone give an example where mp3 decoded to 16 bit is audibly different to lossless source and audible differences are caused by clipping, not by other artifacts?
Here you go (a.mp3 in the zip file).

If you were asking about mp3s sourced from audio that doesn't go above 0dB... I believe that in some cases that's audible too, but I don't have any examples at hand.

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #11
So, can someone give an example where mp3 decoded to 16 bit is audibly different to lossless source and audible differences are caused by clipping, not by other artifacts?
Here you go (a.mp3 in the zip file).
That is not what i meant. And there is no lossless source in this .zip to compare. And i was talking about difference to lossless source.

If you were asking about mp3s sourced from audio that doesn't go above 0dB...
Yes, that what i meant.
1) Take lossless without peaks higher than 0 dB (obviously 16 and 24 bit with fixed point  can't have peaks higher than 0 dB)
2) Encode it to mp3
3) Decode this mp3 to 16 bit wav
4) Hear clipping in this 16 bit wav, that was not audible in lossless source

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #12
hi @Porcus
about replaygain , i can use foobar200 ,can't I?
about the preamp settings ? for the preamp i have set +5.5dB because they sound too quite
and replaygain settings are EBU r128 ,enabled downsample high definition ->choose auto and true peak scan disabled
or it's better to decompress with preamp 0.0dB and after normalize?
thanks

hi @doccolinni
so decode with lame and foobar with  "-S --decode - %d" or "-S --decode %d"  is a good choice, do you ?

hi @Brand
and to avoid do you use replaygain or normalize?
do you use foobar?
thanks

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #13
In the Foobar converter setup choose ReplayGain and then "prevent clipping according to peak". That's going to reduce the volume just enough to prevent clipping, whereas applying gain will typically reduce it more. Select "album" as the source mode, unless you compiled the tracks yourself.
Of course the MP3s need to be scanned with RG first and contain the RG data.

Whether preventing clipping is really necessary or not is up to you. Maybe you'll hear the difference or maybe you won't. But as a safety precaution it makes sense and there are no downsides besides a slightly lowered volume.

I don't really burn CDs nowadays, but this works just fine in Foobar. And you don't need to deal with command line parameters, just convert to WAV or FLAC with the default settings.

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #14
Note, applying RG in converter setup is not the same as using RG volume adjustment in the preamp for playback.

Right-click and Convert, and then in Converter Setup you find it under "Processing".

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #15
Hi @Brand @Porcus

should i set like this with preamp set to 0.0dB ,and i have scanned all my audio file with foobar2000 -> replaygain -> tracks gain

and for lame


Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #16
Sliding that one back to 0.0? Looks reasonable to me.
You have selected "album". If they don't have the album gain tag it will use the track gain tag (I think!)

Then when you are done converting - before burning! - you can check it: take the WAVE files and RG scan them and most likely you would see that a few have a peak of 1 and many don't. At least you have very little classical music in it.

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #17
Sliding that one back to 0.0? Looks reasonable to me.
You have selected "album". If they don't have the album gain tag it will use the track gain tag (I think!)

Then when you are done converting - before burning! - you can check it: take the WAVE files and RG scan them and most likely you would see that a few have a peak of 1 and many don't. At least you have very little classical music in it.
hi Porcus
i know but at 0.0 , they sound so quite
do you mean with prevent clipping according peak with preamp 0.0dB in the playback dsp and in the covert is like a normalize ?
a better normalize because it does use the replaygain engin?
thanks

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #18
I read your screenshot wrong. What you are doing, is just to reduce volume to avoid clipping, not by applying RG preamping.

Yes RG will make them more quiet. Is that a problem where you are going to play the CDR?

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #19
I read your screenshot wrong. What you are doing, is just to reduce volume to avoid clipping, not by applying RG preamping.

Yes RG will make them more quiet. Is that a problem where you are going to play the CDR?
Hi
it's a problem when i play music with different device , just thinking that maybe keeping to track or album ,0.0dB and prevent clipping according peak  , should let play all loud at the same volume right?
yes i have increase the preamp to 5dB or 5dB when i listen muisc to have a more consistent volume
thanks

Re: is there a advantage to decompress mp3 encoded to wave with lame?

Reply #20
They should play at similar "subjective loudness" yes - except those which actually have to get attenuated to avoid clipping, those will be lower.