Log in

View Full Version : Losslessly lower the volume of a layer 2 track


radudumi
15th June 2004, 10:18
Hi everybody


I would like to losslessly lower the volume of a layer 2 track by 6.53 dB. Can you help me please?

I have set the volume of (almost) all the songs from my mp3 collection to 89 dB (using m3gain). However, one of the file is mpeg 1 layer 2, although it has an mp3 extension. mp3gain does not work on layer 2 tracks. Roberto pointed out there is a program besplit with experimental mp2gain support. See this thread:
http://www.hydrogenaudio.org/index.php?showtopic=22147&hl=
I have tried it out, but it would not work. (Maybe I don't know the correct parameters).

What would you suggest me?


Thanks in advance
Radu

radudumi
7th July 2004, 08:53
Maybe DSPGuru can help with MP2Gain?

Thanks

tiki4
7th July 2004, 09:15
Did you try something like:

besplit -core( -input in.mp2 -prefix out -type mp2 -logfile BeSplit.log ) -ota( -G -5db )

Dunno, if that works, normalizing with '-ota( -G max )' works fine, though.

tiki4

radudumi
7th July 2004, 09:44
@tiki4: Thank you for the suggestion.

I tried your command and the result is bit-by-bit the same as the source mp2 (well, apart from the disappearance of the ID3 tags).

The version with -ota( -G max ) results in the same bit-by-bit identical output.

(Please see the URL I inserted into the first post. I already did some tests).


Regards,
Radu

tiki4
7th July 2004, 10:06
Hm, I read the HA thread not completely, but nevertheless post your logfiles here if you expect to get help from one of the mods.

As a suggestion: Try to find out what happens systematically:

1. Encode a WAV to MP2 and try to replaygain it with BeSplit,

2. Replaygain the same WAV file with WAVGain, encode to MP2 and then again replaygaining in BeSplit.

There should be a difference, if the original WAV was not normalized before. Also, make sure that your input files to BeSplit do not contain any stuff like ID3 tags in order to exclude any side effects.

tiki4

radudumi
7th July 2004, 10:28
Ok, here are the logs:


BeSplit v0.9b6 by DSPguru.
--------------------------

Logging start : 07/07/04 , 12:21:37.

besplit -core( -input lyra.mp2 -prefix out -type mp2 -logfile BeSplit.log ) -ota( -G -5db )

[00:00:00:000] +------- BeSplit -----
[00:00:00:000] | Input : lyra.mp2
[00:00:00:000] | Source Sample-Rate: 44.1KHz
[00:00:00:000] | Channels Count: 2, Bitrate: 112kbps
[00:00:00:000] | Output Prefix : out
[00:00:00:000] +---------------------
[00:03:36:215] | Writing out01.mp2
[00:03:36:215] +---------------------
[00:03:36:215] Operation Completed !
[00:00:00:000] <-- Process Duration
Logging ends : 07/07/04 , 12:21:37.


BeSplit v0.9b6 by DSPguru.
--------------------------

Logging start : 07/07/04 , 12:23:00.

besplit -core( -input lyra.mp2 -prefix out -type mp2 -logfile BeSplit.log ) -ota( -G max )

[00:00:00:000] +------- BeSplit -----
[00:00:00:000] | Input : lyra.mp2
[00:00:00:000] | Source Sample-Rate: 44.1KHz
[00:00:00:000] | Channels Count: 2, Bitrate: 112kbps
[00:00:00:000] | Output Prefix : out
[00:00:00:000] +---------------------
[00:03:36:215] | Writing out01.mp2
[00:03:36:215] +---------------------
[00:03:36:215] Operation Completed !
[00:00:02:000] <-- Process Duration
Logging ends : 07/07/04 , 12:23:02.


BeSplit v0.9b6 by DSPguru.
--------------------------

Logging start : 07/07/04 , 12:26:59.

besplit -core( -input lyra.mp2 -prefix out -type mp2 -logfile BeSplit.log ) -ota( -G 1.1 )

[00:00:00:000] +------- BeSplit -----
[00:00:00:000] | Input : lyra.mp2
[00:00:00:000] | Source Sample-Rate: 44.1KHz
[00:00:00:000] | Channels Count: 2, Bitrate: 112kbps
[00:00:00:000] | Output Prefix : out
[00:00:00:000] +---------------------
[00:03:36:215] | Asserted -4.0dB to out01.mp2.
[00:03:36:215] +---------------------
[00:03:36:215] Operation Completed !
[00:00:01:000] <-- Process Duration
Logging ends : 07/07/04 , 12:27:00.


As a suggestion: Try to find out what happens systematically:
Regarding the suggestion, I will do that kind of test and post the result.



Thanks
Radu

radudumi
7th July 2004, 10:35
besplit -core( -input lyra.mp2 -prefix out -type mp2 -logfile BeSplit.log ) -ota( -G x )

When x is between 0.1db and 2db, besplit actually applies -4dB.

When x <= 0, the result is the same as the source.

When x is 2.1db, besplit applies 2dB.


Radu

tiki4
7th July 2004, 12:05
There we go...

Again, I just can guess what's happening: As MP3 only allows to adjust the "volume" by a step of 1.5 dB, this may be similar for MP2. From your results I only can assume that BeSplit just does nothing if the value is too small. Maybe you should try to normalize a file that needs an adjustment of s.th. like +10dB or so. I will test this at well, but clarfication could only be provided by DSPGuru.

Cheers,

tiki4

Btw: Here is the original thread on HA (http://www.hydrogenaudio.org/index.php?showtopic=11227&hl=besplit).

Maybe you also have to adjust '-ota( -G max )' to '-ota( -g xx dB )'.

tiki4
8th July 2004, 11:43
O.K., I tested that stuff a bit:

besplit with -ota( -G max ) works as expected, but only applies max-noclip.

besplit with -ota( -g xxdb ) also works with positive and negative values. I didn't try very small values, though.

Two things are important to keep in mind: besplit applies max-noclip value which was in my short tests considerably higher than the replaygain value (89 dB). I verified my results with the replaygaining feature in foobar2000. Winamp did not turn out to be reliable (in_mp3.dll + replaygain plugin).
If you don't want to use foobar2000 to verify the applied gain value, you can also use an MP2 decoder + WaveGain. I'd recommend an decoder that is known to be reliable, e.g. madplay or lame.

Cheers,

tiki4