INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: OGG and Replay Gain Problem... (version 9)  (Read 3758 times)

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42011
  • Shoes gone again!
OGG and Replay Gain Problem... (version 9)
« on: August 22, 2002, 06:12:55 am »

We're facing a bit of a problem with version 9.

We want to support the standard way of saving and loading Replay Gain for OGG files.

However, it looks like Vorbis Gain doesn't analyze files the same as us, and so puts funky values into the tag.  When you run David Robinson's reference file that should be 0.0 dB, MJ gets 0.0 dB and Vorbis Gain gets like |PLS|5.84 dB.  That's going to cause big problems if you mix MJ analyzed files with Vorbis Gain files.

We've tried to reach both David Robinson and the author of Vorbis Gain, but to no avail.

What should we do?  The only solution we can figure is to save a separate "MJ Replay Gain" so that we can't mix with Vorbis Gain values.

Does anybody have some ideas on this?

Thanks for any help.

-Matt
JRiver, Inc.
Logged
Matt Ashland, JRiver Media Center

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20049
RE:OGG and Replay Gain Problem... (version 9)
« Reply #1 on: August 22, 2002, 06:29:58 am »

why can't you just put a tag in MJ To Denote MJ Analized File

MJAF=Yes If Not Yes Then It Must Be Vorbis Analyzed
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42011
  • Shoes gone again!
RE:OGG and Replay Gain Problem... (version 9)
« Reply #2 on: August 22, 2002, 06:35:10 am »

Good idea.  That's why I asked

It would be nice to get to the bottom of the problem though...

-Matt
Logged
Matt Ashland, JRiver Media Center

john33 (@HA)

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #3 on: August 22, 2002, 06:53:38 am »

The current VorbisGain (0.32) uses the Gain Analysis code from Glen Sawyer dated on, or about, July 3. If you are using the same code then the results should be very similar. I use the same code elsewhere and obtain almost identical results to the VorbisGain code.
Logged

Case

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #4 on: August 22, 2002, 06:54:54 am »

Media Jukebox probably defaults to 83 dB reference level, other replaygain calculators default to 89 dB.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42011
  • Shoes gone again!
RE:OGG and Replay Gain Problem... (version 9)
« Reply #5 on: August 22, 2002, 07:02:15 am »

But David Robinson's reference file is 83 dB pink noise.  Replay Gain should be calibrated from that, and any preamp applied later.

Am I missing something?

-Matt
Logged
Matt Ashland, JRiver Media Center

Case

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #6 on: August 22, 2002, 07:14:12 am »


But David Robinson's reference file is 83 dB pink noise. Replay Gain should be calibrated from that, and any preamp applied later.

Am I missing something?



I really don't know why everyone adapted 89 dB, I haven't followed replaygain conversations long enough. Maybe mp3gain started using it first to please pop music listeners and everyone else followed the path to keep equal loudness with mp3s.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20049
RE:OGG and Replay Gain Problem... (version 9)
« Reply #7 on: August 22, 2002, 07:21:58 am »

>> adapted 89 dB
Would that not be due to the design of the ear and if it was this loud then your reaching the limits of the ear without breaking the drum and bleading starts?
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20049
RE:OGG and Replay Gain Problem... (version 9)
« Reply #8 on: August 22, 2002, 07:30:25 am »

Matt

>> Good idea. That's why I asked

It Would Be Nice If You Could Find A Offical Id3v2 Tag To Cram This All Into.

The Dll I Use To Write Id3v2 Will Not Allow For The Use Of Non Standard ID3v2 Tags. Shame Really Since I Could Take Care Of The Problem With The MJ Extended Tags.

I Am Not As Much as A Guru As I Wish I Was On Writing My Own Id3v2 Stuf.

I Tried But I Ran Out Of Motrin.

An ID3v2 Tag
'    RVAD       20   Relative volume adjustment
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Garf

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #9 on: August 22, 2002, 07:49:15 am »

>We've tried to reach both David Robinson and the author of Vorbis Gain,
>but to no avail.

I received no email from you.

All practical implementations of ReplayGain use 89dB as the reference level (83 6db).

The 6dB was added, as far as I understand, to bridge the gap between non-ReplayGained and ReplayGained files a little more.

If you play a ReplayGained file alongside a non-ReplayGained file, the difference will currently be between 5 and 10dB, depending on how badly the CD was mastered. Thats a big difference, but I'll do no harm. If the 6 dB wouldn't have been added, the difference would be between 11 and 16dB.

A difference of 16dB is potentially dangerous. If you forget to turn down the volume, it could have some nasty consequences.

Bridging the gap a little also solves (somewhat) the problem of users moaning that the ReplayGained files are 'too silent'.

89dB is still low enough the vast majority of CD's will not clip at this level, or only very (inaudibly) little. Or alternatively, if Clipping Prevention is in use, the changes in volume can be kept to a minimum. You certainly don't want to go over 89dB, though.

So, in short, 89dB is a practical compromise that seems to work very well. The VorbisGain spec uses a 89dB reference level, as does MP3Gain and MusePack.

--
GCP
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42011
  • Shoes gone again!
RE:OGG and Replay Gain Problem... (version 9)
« Reply #10 on: August 22, 2002, 07:54:13 am »


If you play a ReplayGained file alongside a non-ReplayGained file, the difference will currently be between 5 and 10dB, depending on how badly the CD was mastered. Thats a big difference, but I'll do no harm. If the 6 dB wouldn't have been added, the difference would be between 11 and 16dB.


That's why players need to handle this, as described by David Robinson's specs.  Media Jukebox uses the average RG value of all the other files in the current playlist if it encounters an unanalyzed file.  To me, that makes more sense than changing the reference gain level.

Anyway, thanks for the reply.

-Matt
JRiver, Inc.

(p.s. are you David Robinson, lear @ algonet.se, or somebody else?  Sorry I'm confused...)
Logged
Matt Ashland, JRiver Media Center

JohnV

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #11 on: August 22, 2002, 08:03:12 am »

Garf is Gian-Carlo Pascutto, developer of the VorbisGain.
David Robinson uses the nick "2BDecided"
Logged

Garf

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #12 on: August 22, 2002, 08:03:47 am »

>That's why players need to handle this, as described by David
>Robinson's specs. Media Jukebox uses the average RG value of all the
>other files in the current playlist if it encounters an unanalyzed
>file. To me, that makes more sense than changing the reference gain
>level.

To me, that method seems like taking a wild stab and hoping it comes out right (granted, the changed reference level is not much better). It's also problematic for players that use plugins and can't 'see' the playlist. But the change of reference level is relatively painless and solves several problems at once. It doesn't really have any disadvantages either.

Note that it wasn't my idea to change the reference level, but since MP3Gain and MusePack had already done it, I chose to follow as I saw no disadvantages in doing so. Not following would mean that mixing a ReplayGained collection of MP3 Ogg MPC would void the benefits of ReplayGain, which was certainly undesirable.

>(p.s. are you David Robinson, lear @ algonet.se, or somebody else?
>Sorry I'm confused...)

Gian-Carlo Pascutto, gcp at sjeng dot org.

Lear is the other VorbisGain developer.

--
GCP
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42011
  • Shoes gone again!
RE:OGG and Replay Gain Problem... (version 9)
« Reply #13 on: August 22, 2002, 08:11:45 am »

Thanks.  It doesn't matter what reference level we use.  0 dB would be fine.  We just need to agree, since we store a delta value.  David Robinson's official site has said 83 dB for a long time, so that's what we went with.

However, we'll just make our plugins convert from 83 dB to 89 dB when saving / loading tags.

Just to make sure:

89 dB: MP3, OGG, MPC
83 dB: APE, and any other format that MJ supports

Is that right?

Thanks again for your time everyone.

-Matt (monkey on hydrogenaudio and r3mix)

(b.t.w. I think you need to get some of the Hydrogen Audio folks to give MJ 8 a whirl -- it's the only way to go -- 32-bit playback engine, cross-fading, gapless, native Replay Gain, and so many other goodies )
Logged
Matt Ashland, JRiver Media Center

Case

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #14 on: August 22, 2002, 08:21:25 am »


(b.t.w. I think you need to get some of the Hydrogen Audio folks to give MJ 8 a whirl -- it's the only way to go -- 32-bit playback engine, cross-fading, gapless, native Replay Gain, and so many other goodies )

How do you enable album based replaygain? I can only find track based?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42011
  • Shoes gone again!
RE:OGG and Replay Gain Problem... (version 9)
« Reply #15 on: August 22, 2002, 08:26:15 am »


How do you enable album based replaygain? I can only find track based?


I don't want to launch a debate, but I'd argue that album based replay gain isn't that useful.  I mean, if I'm going to be listening to the same album for an hour, why use replay gain at all -- all it's doing is throwing away precision and adding to the S/N ratio.

I'll take that S/N hit when I'm mixing tracks because it's worth it so I don't have to adjust the volume.  If I'm not going to touch the volume for a long time anyway, why lose the precision?

That's just one monkey's opinion though.  If enough people would like this, we'll add support for it.

Thanks and take care.

-Matt
Logged
Matt Ashland, JRiver Media Center

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5907
  • Farm Animal Stupid
RE:OGG and Replay Gain Problem... (version 9)
« Reply #16 on: August 22, 2002, 08:33:55 am »

I pretty much agree with you Matt, except that it's hard for me (with my fragile mind) to remember to disable RG when I decide to listen to a complete album. Especially since the RG switch is buried in the DSP studio. Add in the use of a remote to queue up tracks or albums and the problem becomes even more apparent.
Logged

Garf

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #17 on: August 22, 2002, 08:48:22 am »

>I don't want to launch a debate, but I'd argue that album based replay >gain isn't that useful.

Funny statement, considering it's the only one I use

>I mean, if I'm going to be listening to the same album for an hour, why
>use replay gain at all -- all it's doing is throwing away precision
>and adding to the S/N ratio.

Also funny. Neither of the ReplayGain implementations I did or helped with has this problem. (XMMS and WinAMP)

--
GCP
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42011
  • Shoes gone again!
RE:OGG and Replay Gain Problem... (version 9)
« Reply #18 on: August 22, 2002, 09:00:48 am »

Garf, anytime you attenuate sound you're adding to the S/N ratio.  It's no fault of Media Jukebox's, and in fact, Media Jukebox is superior to XMMS or Winamp because it uses a true 32-bit engine and can output at 24 or 32-bit.

It's just signal theory.  Once you remove bits (by attenuation) you can't get them back.

Otherwise Monkey's Audio could get infinite lossless compression by using replay gain, which of course, is non-sense...

-Matt
Logged
Matt Ashland, JRiver Media Center

Garf

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #19 on: August 22, 2002, 09:47:18 am »

>Garf, anytime you attenuate sound you're adding to the S/N ratio.
>It's no fault of Media Jukebox's, and in fact, Media Jukebox is
>superior to XMMS or Winamp because it uses a true 32-bit engine and
>can output at 24 or 32-bit.

The Vorbis plugin I wrote (which is default in CVS I believe)
does full 32-bit processing as well ;)

>It's just signal theory. Once you remove bits (by attenuation) you
>can't get them back.

If you're encoding 16-bits PCM (CD), get the 32-bits float output from the Vorbis libs and work on that, you're not going to be adding to the S/N ratio in any amount that practically matters, because no piece of hardware can even output full 24 bits resolution. Any quantization error you introduce by scaling the 32 bits data are completely irrelevant.

--
GCP
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42011
  • Shoes gone again!
RE:OGG and Replay Gain Problem... (version 9)
« Reply #20 on: August 22, 2002, 10:49:50 am »

Garf, we're just tossing around apples and oranges, and it doesn't really matter.

If you have a really quiet signal, even if all the precision is there in the 32-bits, it won't pan out that well by the time you get it to the speakers because of how (most) hardware works.  It'd have been better to not attenuate the signal.

Anyway, thanks again for helping us out.

-Matt
Logged
Matt Ashland, JRiver Media Center

LCtheDJ

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #21 on: August 22, 2002, 04:11:35 pm »

Matt,

There is a quite long discussion thread at Hydrogen Audio about implementation of Replay Gain in Ogg Vorbis files.  My brief summary on it is that the people at Xiph MAY specify a standard for it some time soon; but until they do, pretty much everyone can do it by whatever means they want (chaos).  Note that the tread started last May, before Ogg Vorbis came out with 1.0.  Now that 1.0 has been released, maybe they would be receptive to your request for them to address this soon.  I for one would NOT like to analyze again for each player used.  You can read it yourself here:

Flaw in ReplayGain spec:
http://www.hydrogenaudio.org/forums/showthread.php?s=05b324574fb1cc66391ec0c12230b2c6&threadid=1826

As I remember from lurking at various message boards, several people thought that using mp3Gain set at 83 dB didn't give them enough volume in their weakly amplified portable players.  The default was bumped up to 89 which still prevents most files from clipping and give a louder playback.

I was wondering why my .mp3 and .ogg files that were mp3Gain and VorbisGain adjusted to 89 db were being further reduced by MJ's Replay Gain adjustment.  Now I see why.  MJ is aiming for 83 dB.  I also wondered why files that had not been analysed by MJ were still being adjusted on playback.  Your earlier post shows that MJ averages the settings of files that WERE analyzed and applies that to the un-analyzed files.  Thanks for clearing that up.


To the folks from Hydrogen Audio at http://www.hydrogenaudio.org , thanks for visiting the forum at J River.  I wonder how many besides myself are regular readers of both boards.
Logged

Garf

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #22 on: August 23, 2002, 01:39:25 am »

>Now that 1.0 has been released, maybe they would be receptive to your
>request for them to address this soon. I for one would NOT like to
>analyze again for each player used.

I have no reason to believe xiph.org will address ReplayGain anytime soon. And with soon I mean at least the next year or so.

The revised spec I proposed in the thread I pointed you to is clean, very easy to implement, and supports all features of ReplayGain, and doesn't interfere with normal operation. The software to use it (VorbisGain) is already written, and the most used audio players have decided to support it (XMMS, WinAMP, and I suppose now MJ also?).

So if someone wants to use ReplayGain with Vorbis, I'd obviously recommend following the spec. There's no good reason to reinvent your own one.

It would have been nice if the spec was accepted as a standard, but it seems xiph.org isn't willing to do anything related to it for the near and not-so-near future, and their developers are divided on the matter whether the spec is good or not.

--
GCP
Logged

LCtheDJ

  • Guest
RE:OGG and Replay Gain Problem... (version 9)
« Reply #23 on: August 23, 2002, 03:59:56 pm »

Mostly this is just a bump; but...

Is that to imply that J River has permission to use the VorbisGain method and/or code for Replay Gain in .ogg files?
Logged
Pages: [1]   Go Up