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: RG track Gain in LAME header (Read 4005 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

RG track Gain in LAME header


I would like to remove the gain value from the LAME header but I can't seem to find any existing software that will do this - from searching around it sounds like the only thing I can do is use a hex editor to change the values?

Example:

Tag revision:      0
Encoder string:    LAME
Version string:    3.97
Quality:            77 (V2 and q3)
Encoding method:    vbr new / vbr mtrh
Lowpass:            18,600Hz
RG track peak:      <not stored>
RG track gain:      -11.1dB (determined automatically)
RG album gain:      <not stored>
nspsytune:          yes
nssafejoint:        yes
nogap continued:    no
nogap continuation: no
ATH type:          4
Bitrate:            minimal (-b) bitrate 32
Encoder delay:      576 samples
Padded at end:      1,152 samples
Noise shaping:      1
Stereo mode:        joint
Unwise settings:    no
Source sample freq: 44.1kHz
MP3Gain change:    <none>
Preset:            V2: preset standard (fast mode)
Surround info:      none
Music length:      8,100,760 bytes
Music CRC:          C97E
Actual Music CRC:  C97E
Info tag CRC:      80EE
Actual InfoTag CRC: 80EE

I did this by opening the file in a hex editor and changed byte $AB-$AC with 00.  This appears to have worked when I re-check the LAME header, it now states:

Tag revision:      0
Encoder string:    LAME
Version string:    3.97
Quality:            77 (V2 and q3)
Encoding method:    vbr new / vbr mtrh
Lowpass:            18,600Hz
RG track peak:      <not stored>
RG track gain:      <not stored>
RG album gain:      <not stored>
nspsytune:          yes
nssafejoint:        yes
nogap continued:    no
nogap continuation: no
ATH type:          4
Bitrate:            minimal (-b) bitrate 32
Encoder delay:      576 samples
Padded at end:      1,152 samples
Noise shaping:      1
Stereo mode:        joint
Unwise settings:    no
Source sample freq: 44.1kHz
MP3Gain change:    <none>
Preset:            V2: preset standard (fast mode)
Surround info:      none
Music length:      8,100,760 bytes
Music CRC:          C97E
Actual Music CRC:  C97E
Info tag CRC:      80EE
Actual InfoTag CRC: A722

Is this cool, or am I missing something important?





RG track Gain in LAME header

Reply #1
If you just want to disable ReplayGain analysis on tracks you encode in the future, have you tried the --noreplaygain switch? If it produces the result you desire, it may even be faster to re-encode all your other tracks than to manually edit each one, assuming you still have the lossless sources that you used for the original encoding process.


RG track Gain in LAME header

Reply #3
For some of the files I don't have the CDs anymore - I had to sell a bunch of them a year or two ago - needed some extra cash at the time.  Wish I didn't sell them now, but what can you do?

From what I understand, LAME doesn't change anything in the actual song when encoding with the Replay Gain option.  It only adds the gain value to the LAME header (Track or Album depending on which one you have applied).  If this assumption is correct, this should work.

You will notice from my LameTag shot - the value for Actucal Infotag CRC at the bottom changes which I assume is because the length of the LAME tag changes - its easy to go back into the file and also update the Infotag CRC so everything matches.  This process actual doesn't take that long once you get going - unless you have quite a few files to adjust.  This is actually faster than re-compiling for me.



RG track Gain in LAME header

Reply #5

Do you have some very rare software or hardware that actually acts on the LAME header's replaygain information and cannot disable the feature?

RG track Gain in LAME header

Reply #6
Ummm...maybe I've got this completely wrong, but if he just wants to remove ReplayGain tags, couldn't foobar2000 do that for him quite easily?

 

RG track Gain in LAME header

Reply #7
Yep, you have this wrong.  He wants to remove the metadata from the lame header which is different from ID3v2 tags, which foobar2000 uses.