HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: maiki on 2008-01-03 14:18:32

Title: SR 88200 Replay Gain possible?
Post by: maiki on 2008-01-03 14:18:32
Hi,

I have got a 24-bit 88200 Hz STEREO FLAC album from Musictrade.

Now, how do I calculate Replay Gain for it, as I always use RG. The program I actually use, called MetaFLAC.exe says: "The sample rate must be one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48 kHz."

Similar situation with another one I use, WaveGain: "WaveGain input files may be 8, 16, 24 or 32 bit integer, or floating point wave files with 1 or 2 channels and a sample rate of 48000Hz, 44100Hz, 32000Hz, 24000Hz, 22050Hz, 16000Hz, 12000Hz, 11025Hz or 8000Hz."

Any new programs that can address higher SRs?

So, what should I do when the source is 88200 Hz then? Should I decode it into WAVE and cut the sample rate to 44100, calculate RG, and use the values in the original source? Seems quite acceptable to me.
Title: SR 88200 Replay Gain possible?
Post by: pdq on 2008-01-03 16:35:11
I'm sure that you won't make the obvious mistake of resampling to 44100, making your modifications, and then resampling back to 88200. Once you resample to 44100, leave it there.
Title: SR 88200 Replay Gain possible?
Post by: knutinh on 2008-01-03 17:01:04
I dont know the inner workings of Replay Gain but a fair guess would be that calculating the RG value for a downsampled version, then applying the tags directly to the original (non-touched file) would work excellent.

-k
Title: SR 88200 Replay Gain possible?
Post by: maiki on 2008-01-03 17:19:26
I dont know the inner workings of Replay Gain but a fair guess would be that calculating the RG value for a downsampled version, then applying the tags directly to the original (non-touched file) would work excellent.

-k


yes, that is what I think as well
Title: SR 88200 Replay Gain possible?
Post by: benski on 2008-01-03 18:13:44
Hi,

I have got a 24-bit 88200 Hz STEREO FLAC album from Musictrade.

Now, how do I calculate Replay Gain for it, as I always use RG. The program I actually use, called MetaFLAC.exe says: "The sample rate must be one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48 kHz."

Similar situation with another one I use, WaveGain: "WaveGain input files may be 8, 16, 24 or 32 bit integer, or floating point wave files with 1 or 2 channels and a sample rate of 48000Hz, 44100Hz, 32000Hz, 24000Hz, 22050Hz, 16000Hz, 12000Hz, 11025Hz or 8000Hz."

Any new programs that can address higher SRs?

So, what should I do when the source is 88200 Hz then? Should I decode it into WAVE and cut the sample rate to 44100, calculate RG, and use the values in the original source? Seems quite acceptable to me.


You can calculate Replay Gain with Winamp 5.51 or higher - I added filter coefficients for 64khz, 88.2khz and 96khz.  Since I use the LGPL implementation of ReplayGain, I submitted a patch for AACGain to allow these sample rates, also.  It's been accepted, but I'm not sure that it's made its way onto other projects yet.  I will talk to Josh Coalson about adding support to MetaFLAC, also.
Title: SR 88200 Replay Gain possible?
Post by: slks on 2008-01-03 19:21:04
If you resample, make sure you don't attenuate the signal any. Peak values will be different in the resampled file, but track and album gain should be nearly the same.
Title: SR 88200 Replay Gain possible?
Post by: Alex B on 2008-01-03 20:34:22
I wonder why no one has mentioned foobar2000 yet. It can analyze 88.2 kHz FLAC files and add replay gain tags.

Actually, I think foobar can do this with any format it can decode. If the file format cannot be tagged with foobar usually a cue sheet or APL files can be used for holding the tags.
Title: SR 88200 Replay Gain possible?
Post by: maiki on 2008-01-04 08:31:20
You can calculate Replay Gain with Winamp 5.51 or higher - I added filter coefficients for 64khz, 88.2khz and 96khz.  Since I use the LGPL implementation of ReplayGain, I submitted a patch for AACGain to allow these sample rates, also.  It's been accepted, but I'm not sure that it's made its way onto other projects yet.  I will talk to Josh Coalson about adding support to MetaFLAC, also.


I have tried 5.51 and it ended up with the values like: +64.82 dB. I used right click and selected Send To - Calculate Replay Gain. BTW, Winamp refused to calculate RG on decoded WAVE files, although they show fine in Goldwave as 24-bit 88200.

It is obviously distorted as hell.



update: I resampled one track in Goldwave to 44100 and WaveGain reports:

Analyzing...

  Gain  |  Peak  | Scale | New Peak |Left DC|Right DC| Track
          |        |      |          |Offset | Offset | Track
--------------------------------------------------------------
-0.19 dB |  32400 |  0.98 |    31699 |  -7  |    -7  | 01.wav


WaveGain Processing completed normally
Title: SR 88200 Replay Gain possible?
Post by: 2Bdecided on 2008-01-04 10:59:43
If you look at the graph at the bottom of this page...

http://replaygain.hydrogenaudio.org/equal_loudness.html (http://replaygain.hydrogenaudio.org/equal_loudness.html)

...you'll see ReplayGain filters out everything above 22kHz before "listening" to the signal, so the 88.2 and 44.1kHz sampled versions should give near identical results. If you get more than 1dB or so difference, then something has probably gone wrong somewhere.

As noted, the peaks will be different, but the loudness will be the same.

Cheers,
David.