Help - Search - Members - Calendar
Full Version: --xlevel Vs. Replaygain Regarding Clipping
Hydrogenaudio Forums > Lossy Audio Compression > MPC
user
Does --xlevel has any negative influence to audio quality ?

Should be the recomemnded switch in list of recommended settings be:

--quality x.xx --xlevel or just --quality x.xx ?


Is --xlevel anyways necessary, because you can avoid clipping by using replaygain (mpcbatchencoder eg, as frontend; later applying noclipping by Winamp) ?
Garf
QUOTE(user @ Sep 7 2002 - 08:32 PM)
Is --xlevel anyways necessary, because you can avoid clipping by using replaygain (mpcbatchencoder eg, as frontend; later applying noclipping by Winamp) ?

AFAIK, yes, because internal clipping is a SV7 limitation that is not solved by ReplayGain. It clips upon encode, not decode.
user
aha, so the recommended switch is:

--quality x.xx --xlevel

and later in

Replaygain --auto
liekloo
Interesting question, since xlevel seems to gain suddenly importance, and to be honest I have never cared about it.
user
More questions to replaygain:


<anacondo> one question: if i want to burn my decoded files so the results are like the original
<anacondo> should I use --prev gain 1 or --prev --gain 3?

<user> excellent question. I have asked myself it.

<user> In the meantime I assume, that --gain x = : 0+2, and 1+3 are the same (similar), but: 0+1 mean: maximizing without clipping, 2+3: no maximizing. so --prev --gain 1 would be best


--prev --gain x

--prev means : clipping is avoided !
--gain x means : applied Replaygain correction:
x = 0: No usage of replaygain, if using clipping protection this is
done on a title by title base, i.e. every title's gain is
reduced so that exactly this title is not clipped.
x = 1: No usage of replaygain, if using clipping protection this is
done on an album base, i.e. every title's gain is
reduced so that:
- every title of an album is attenuated by the same amount
- no title of this album is clipped
x = 2: Usage of the title based replaygain, rest like 0.
x = 3: Usage of the album based replaygain, rest like 1.



My conclusion:


--prev --gain 1

maximizes the volume of one album, so that it does not clip.
Really useful setting for one album.



--prev --gain 3

Averages the volume of several albums, so that one album has the same average volume like another album. Clipping is avoided.
Useful setting for several albums.



--prev --gain 2 (or : --gain 0)

2 : The average volume of all titles is the same. Clipping is avoided.
--gain 0 should not be recommended.
Gecko
--xlevel fixes internal clipping that is due to insufficiencies of the file format.
Replaygain can be used to determine the amount of scaling that needs to be applied while decoding to avoid clipping of the resynthesized signal.
shimage
would it be horrible to wavegain the wavs first, and not bother with any of that stuff? i still use replaygain, since i usually use the title-based thinger, but ... yeah.
user
--prev --gain 0 : every file which does not clip, stays as it is. clipping files are reduced a little bit.

--prev --gain 1 : from one album, the highest clipping file is found, all files are reduced by same amount, so that "loudest file" does not clip anymore.


--prev --gain 1

maximizes the volume of one album, so that it does not clip.
Really useful setting for one album.



--prev --gain 3

Averages the volume of several albums, so that one album has the same average volume like another album. Clipping is avoided.
Useful setting for several albums.



--prev --gain 2 (or : --gain 0)

2 : The average volume of all titles is the same. Clipping is avoided.
--gain 0 should not be recommended.




Are these explanations correct ?
Gecko
@shimage: see this thread for more info on clipping and --xlevel. http://www.audio-illumination.org/forums/i...=ST&f=11&t=3106

Wavegain is not recommended. Scaling your input file will worsen quality.

@user: see the FAQ on Frank Klemm's site, the replaygain switches are explained well. If I am not mistaken, your second interpretation of "--prev --gain 1" is incorrect. The volume isn't maximized.
QUOTE
Q26: I want to listen to the music as loud as possible.
A26: mppdec --scale 99 *.mpc

Q27: ... but without this horrible distortions!!!
A27: mppdec --scale 99 --prev *.mpc

QUOTE
Q29: What makes --gain (starting with mppdec 0.98y)?
A29: --gain 0: no gain correction, clipping prevention is done by title
              based peak levels, if selected
    --gain 1: no gain correction, clipping prevention is done by album
              based peak levels, if selected. So the loudness balance
              between titles of the same album is preserved. All titles
              of one album are attenuated by the same factor to
              prevent clipping of all titles. --gain 1 is never
              louder than --gain 0
    --gain 2: title based gain correction, clipping prevention is done by title
              based peak levels, if selected
    --gain 3: album based gain correction, clipping prevention is done by album
              based peak levels, if selected. So the loudness balance
              between titles of the same album is preserved. All titles
              of one album are attenuated and gain corrected by the same factor to
              prevent clipping of all titles.
user
--prev --gain 1 : from one album, the highest clipping file is found, all files are reduced by same amount, so that "loudest file" does not clip anymore.

"If I am not mistaken, your second interpretation of "--prev --gain 1" is incorrect. The volume isn't maximized."
My word maximizing is perhaps not the best one. But read my explanation written above.
Of course "album maximization" means normally reduction of all files by same amount to avoid clipping, because mostly you have at least one clipping song in a collection todays.
Question:
Is that explanation correct, ie. that loudest peak is as near as possible to digital maximum (in mp3 it is 32767) ?




And you should see, that Q29/A29 does not answer much.
Because the text for gain 1 and gain 3 (for gain 0 and 2 also) is very very similar.
You cannot read from that text, to which averaged target volume the title or the album correction is performed.
Usually it should be 89db.

I have cited the corresponding text from the latest original manual.txt.
Because Frank's wording is unclear to me, I have tried to write it in "user's words".

My point is, does the difference between gain 1 and 3 mean:
3: if you apply gain3 to several albums (of course one after the other, independent, for each album one step required) , do these albums have the same averaged volume (eg. 89 db like in mp3gain) ?
1: if you apply gain1 to several albums, is it correct, that each album's highest peak is very close to digital maximum ?
In this case different albums would have different averaged volumes. You would have to use your volume knob, to make that the different albums sound like the same volume....
CiTay
QUOTE(user @ Sep 8 2002 - 10:47 AM)
My point is, does the difference between gain 1 and 3 mean:
[...]

Yes.
Gecko
The difference between gain 1 and gain 3 is that gain 1 does not do any replaygain adjustments.
QUOTE
--gain 1: no gain correction
--gain 3: album based gain correction

Clipping prevention is only applied if specified with --prev. If I understand things correctly then gain 0/1 alone will not change the output.
Gain 0/1 define the way clipping prevention is done. gain 0: per title, gain 1: per album.
Gain 2/3 define the way replaygain (and clipping prevention if wanted) is applied. gain 2: per title, gain 3: per album
If you specify gain 2/3 then clipping prevention (if activated) will be done per title or per album respectively.

I guess the reason why you don't have "--prev 0/1/2" is because it would not make sense to apply album based replaygain and then do title based clipping prevention. So it is all bundled in one switch.
user
Yes, I think in the last 3 previous posts of Citay, user and Gecko the behaviour of --gain x --prev is described clearly well now.
zokik
I'm not quite sure I got this about xlevel switch. If a song would clip internally (due to a bug or something in musepack codec?), then xlevel should repair this by lowering the volume, and if a song would not clip then xlevel does nothing, i.e. does not change or worsen the quality of encoded file?
spase
--xlevel uses an alternative filterbank that fixes problems with internal clipping, however it breaks compatibility with much older decoders/players
CiTay
QUOTE(zokik @ Sep 9 2002 - 09:43 PM)
If a song would clip internally (due to a bug or something in musepack codec?), then xlevel should repair this by lowering the volume, and if a song would not clip then xlevel does nothing, i.e. does not change or worsen the quality of encoded file?

No, --xlevel doesn't lower the volume, it prevents the otherwise internally clipping parts from clipping, by extending the "encodable range" for that moment, so to speak. This method is incompatible to old decoders (such as Andree Buschmann's original versions).

If a song wouldn't have internal clipping, --xlevel doesn't change the file at all.
paranoos
...
and if we're using --xlevel, but we are STILL, on the rare occasion, getting internal clipping errors, then we should stop listening to hard rock music? heh

ok seriously now, i use --xlevel all the time, and maybe 5 or 6 tracks still have 1 or 2 internal clipping errors in them. i heard that SV8 should fix all problems with clipping errors, and that there will be a lossless SV8 transcoder for MPC files... of course, the transcoder would be compatible with --xlevel encoded tracks... but will the SV8 transcode fix clipping errors?

I haven't ever noticed these clipping errors while listening, but it would be nice just to know that my songs will be error-free in the (hopefully) near future.

Otherwise, MPC is great, and I'm really happy with it. wub.gif I switched mostly because encoding time and filesize are much better than mp3 apfs. ph34r.gif
Gecko
QUOTE(paranoos @ Sep 11 2002 - 05:37 AM)
on the rare occasion, getting internal clipping errors, then we should stop listening to hard rock music? heh

...or latest Jennifer Lopez album. Hundreds of clippings even with xlevel! It's horrible! (Luckily I don't have to listen to it) The internal clipping errors won't go away if you convert your SV7 files to SV8. The information is lost forever. ph34r.gif But if a track is that saturated allready, you will not hear the clippings. I am sure of it. Just ignore them. Most of the time even regular internal clipping can be ignored. I tried creating a track that would clip on purpose with cool edit's hard limiter. Can't do, the song just wouldn't clip. I don't know what they do in the mastering studios to muck up the sound like that. I also don't know if SV8 will work similar to xlevel or use a different approach that completely eliminates clipping.
paranoos
from what i have read, SV8 will work like xlevel, with a much larger range, far exceeding CD audio. xlevel already exceeds CDs for -db, but not +db.

thx for the answers, gecko
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-2009 Invision Power Services, Inc.