Help - Search - Members - Calendar
Full Version: Replaygain and portables
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific Discussion
Martel
I just read how the Replaygain works and it seems quite O.K. Scanning the encoded file for the maximum amplitude (by decoding it) and preventing clipping by applying caclulated gain seems a good thing.

But what with portables? They are barely able to read IDxx tags properly, so i don't expect them to apply ReplayGain tags at all (am i right?)...

Psychoacoustic filtering used in lossy codecs may bring the amplitude far beyond the original one (especially with distorted, near-to-square electric guitar sounds) and the portable players are very likely to clip anything beyond the digital range, unfortunately. sad.gif

Would it be a difference (in the end) between applying ReplayGain and applying pre-encode gain? The dynamic range would be the same upon playback and players wouldn't have to implement ReplayGain at all...

The only problem might be the estimation of the pre-encode gain, the simplest solution i see is to encode twice (first encode without any pre-gain, then decode and check the amplitude, then encode with appropriate pre-gain - won't be 100% accurate, but fast).

The resulting encoded file would be 100% compatible (will play "the same" "anywhere") and there will be no dyn. range loss compared to playing with ReplayGain... (at least i think there won't be) smile.gif
kl33per
Whoah! Heaps of questions. Ok...

For portables, the iPod uses SoundCheck. ReplayGain values can be converted to SoundCheck values by using the foo_pod plugin for foobar.

Yes, amplitude of a lossy encoded track compared to it's lossless original will differ.

Their are two main difference's between pre and post encoding schemes.

Applying ReplayGain before encoding (and using ReplayGain to create the resulting lossy encode) will force you to permantly pick one of ReplayGain's modes, track of album. If it is done post encode uisng tags, you can select either track gain, or album gain at playback time.
Lynx
QUOTE(Martel @ Jan 4 2006, 11:34 AM)
But what with portables? They are barely able to read IDxx tags properly, so i don't expect them to apply ReplayGain tags at all (am i right?)...


The Rockbox alternative firmware has replaygain support for the Iriver H1xx players, and for the H3x0 ones, once finished, also, I guess. Although there is no official release for the Iriver players yet, it's quite usable.
See www.rockbox.org if you own one of those players.
kjoonlee
If you use MP3 files, you can also apply Replaygain afterwards with MP3Gain.

http://en.wikipedia.org/wiki/Replay_Gain
Martel
QUOTE(kjoonlee @ Jan 4 2006, 02:42 AM)
If you use MP3 files, you can also apply Replaygain afterwards with MP3Gain.

http://en.wikipedia.org/wiki/Replay_Gain
*



But what of Vorbis or MusePack?
Also note that i did not only lay questions but also had some proposals. I'd be glad if someone would try to talk me out of them (discouraged pre-gain using some scientific explanation).
Now, when i encode a disc, i try to scale the input waves (all by the same ratio) and encode them until i get just a few clipped samples in them upon decoding (CoolEditPro's "Analyze" feature is helpful). Helpful for my portable (LG-MF-FE505) without ReplayGain.
rsilva
Martel,

After reading this thread I found wavegain. If I understand what it does, you can use before encoding your ogg (or whatever) and then get the normalized sound everywhere.

I will take a closer look at it. I didn't know about it and it looks like a good solution.
beto
I don't know if it helps but I'll tell you what I do:

1. I have my digital library in both wavpack/flac and vorbis

2. For flac/wavpack I have replaygain stored in tags calculated by foobar and I use only foobar for playback

3. My ogg files were created by foobar, from the lossless files, using the replaygain tag information to scale down the tracks. Kinda like in a pre-encoding level processing.

Works very good for me in my player (Karma). Everything is leveled using album gain... smile.gif
Shade[ST]
I encode all my albums with LameGain : album-gain normalized per album, and I then add trackgain values with foobar.
beto
QUOTE(Shade[ST] @ Jan 4 2006, 04:19 PM)
I encode all my albums with LameGain : album-gain normalized per album, and I then add trackgain values with foobar.
*



I suppose you like to have all your tracks in foobar at the same level. Me on the other hand like the level differences provided by album gain so I do not add trackgain after album-gain normalization. cool.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.