IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Scale option in LAME, Should be used?
KaoDome
post Dec 14 2008, 14:58
Post #1





Group: Members
Posts: 3
Joined: 14-December 08
Member No.: 64502



Hi there, I'm converting part of my collection (FLACs mainly) to mp3 using LAME 3.98.2. When I convert a loseless file using the --clipdetect switch, it says some info in the end about detected clipping. It also shows me a value I could use to reencode the file in order to avoid clipping.

The question is, in your opinion, should I reencode the files (as I still have the loseless ones) using the --scale switch to avoid clipping?

Thank you very much for your time and answers.
Go to the top of the page
+Quote Post
Slipstreem
post Dec 14 2008, 15:13
Post #2





Group: Members
Posts: 966
Joined: 7-July 06
Member No.: 32660



No.

Cheers, Slipstreem. cool.gif
Go to the top of the page
+Quote Post
pdq
post Dec 14 2008, 17:03
Post #3





Group: Members
Posts: 3403
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



This is really a two-part question. Should you reencode your files, and if you do should you do it by using the --scale switch.

The answer to the first question is that I personally wouldn't bother. The likelihood that you will actually hear a difference is small.

If you decide that it is worth reencoding, or that you want to rescale for any further encoding that you do, then using the --scale switch is an excellent choice. Unlike mp3gain, you are not limited to increments of 1.5 dB in gain, and unlike replaygain, your files are compatible with all players, not just the ones that apply replaygain.
Go to the top of the page
+Quote Post
KaoDome
post Dec 14 2008, 18:20
Post #4





Group: Members
Posts: 3
Joined: 14-December 08
Member No.: 64502



Thank you very much for your quickness.

I'm making some tests as I still have to convert some files (not enough space to have them all encoded with a loseless codec). Here is the output of the same file regarding that switch:

Switches: --verbose --clipdetect -q0 -V0 -p
CODE
ReplayGain: -8.3dB
WARNING: clipping occurs at the current gain. Set your decoder to decrease the  gain  by  at least 1.5dB or encode again using  --scale 0.85 or less (the value under --scale is approximate).


Switches: --verbose --clipdetect --scale 0.81 -q0 -V0 -p
CODE
ReplayGain: -6.9dB
WARNING: clipping occurs at the current gain. Set your decoder to decrease the  gain  by  at least 0.4dB or encode again using --scale <arg> (For a suggestion on the optimal value of <arg> encode with  --scale 1 first)


So... I still have to use ReplayGain when playing that song (it happens with some more I've tried too). The source was a FLAC file, ripped directly from the original CD so "--scale 1" would give the same results.

(@pdq:) If you had to encode some files (and if you had time too, as in order to apply the --scale switch you must go track by track) would you use it?

@Slipstreem: Why not? Will some detail be lost?

Thank you very much for your time and answers once more.
Go to the top of the page
+Quote Post
Slipstreem
post Dec 15 2008, 04:19
Post #5





Group: Members
Posts: 966
Joined: 7-July 06
Member No.: 32660



Sorry. It looked as though you were after a straight "yes" or "no" answer. As pdq so rightly suggests, unless you can actually hear the results of the clipping, it's a needless process. I can understand someone wanting to do it purely out of correctness though. There's nothing wrong with doing it, per se. smile.gif

Cheers, Slipstreem. cool.gif
Go to the top of the page
+Quote Post
pdq
post Dec 15 2008, 15:25
Post #6





Group: Members
Posts: 3403
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



Your first encode, where you omitted --scale, is indeed equivalent to using --scale 1.0.

When it says that the factor of 0.85 is approximate, it means that value may be too much, or it may be too little. Only further experimenting will tell you for sure because changing the scale changes too many other factors in the encode to be totally predictable.

When it says that an additional 0.4 dB is needed, this is a VERY small adjustment and I don't think you need to go that extra step (Of coures, I personally wouldn't have bothered with the initial 1.5 dB adjustment).

However, I think that far more important than looking for tiny amounts of clipping, you should be more interested in adjusting all of your files to make them equal loudness, using either mp3gain or replaygain. If you do this then most likely all of you clipping issues will disappear, because those files that are clipping are also probably too lound and will be adjusted down naturally to match your other files.
Go to the top of the page
+Quote Post
sundance
post Dec 15 2008, 15:57
Post #7





Group: Members
Posts: 166
Joined: 17-April 02
Member No.: 1804



I also have my collection in lossless formats.
And I use the scale option in my mp3 encodes to apply the replaygain values stored in the lossless files.
So I don't have to worry about different DAPs that don't support reading replaygain.
Go to the top of the page
+Quote Post
pdq
post Dec 15 2008, 16:30
Post #8





Group: Members
Posts: 3403
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



Is that an automated process or do you do it manually?
Go to the top of the page
+Quote Post
Slipstreem
post Dec 15 2008, 16:45
Post #9





Group: Members
Posts: 966
Joined: 7-July 06
Member No.: 32660



QUOTE (pdq @ Dec 15 2008, 14:25) *
However, I think that far more important than looking for tiny amounts of clipping, you should be more interested in adjusting all of your files to make them equal loudness, using either mp3gain or replaygain. If you do this then most likely all of you clipping issues will disappear, because those files that are clipping are also probably too lound and will be adjusted down naturally to match your other files.
I wouldn't recommend that approach personally. It destroys the relative dynamic levels of tracks per album and can ruin the whole feel of an album in my opinion. You're also likely to get audible jumps in volume between tracks when they're intended to be (and are) played back gaplessly.

I'd either leave the tracks alone or apply gain adjustment in the style of ReplayGain album gain myself. smile.gif

Cheers, Slipstreem. cool.gif
Go to the top of the page
+Quote Post
sundance
post Dec 15 2008, 16:58
Post #10





Group: Members
Posts: 166
Joined: 17-April 02
Member No.: 1804



QUOTE
Is that an automated process or do you do it manually?

I once found a VB script here in HA (I think its name was flac2lame.vbs or something...). I used that for quite a while...

QUOTE
It destroys the relative dynamic levels of tracks per album and can ruin the whole feel of an album in my opinion
Yes, of course, I'll apply replaygain-album values just because of that! So the resulting mp3s have an album gain of 0dB and various track gain values.
Go to the top of the page
+Quote Post
KaoDome
post Dec 16 2008, 10:58
Post #11





Group: Members
Posts: 3
Joined: 14-December 08
Member No.: 64502



Thank you very much for all of your answers and your time!

I see things clearer right now, I'll look for that script as it seems to be quite useful and I have ReplayGain calculated for all of the files in my collection.

I'll make more tests before deciding what to do though. I'll apply the ReplayGain album values using that script and then I'll see. I would like to lose the less detail possible.

I have almost discarded mp3gain, I wouldn't like to normalize the files, though I'll take some tests with that too.

What I still don't understand... Why the values stored in RG tags are so high? For example, according to the second encoding in my last post, the decoder should be set to decrease the gain by 0.4dB, but the RG tag stored is -6.9dB. And so the album values.

Thanks once more for everything.
Go to the top of the page
+Quote Post
halb27
post Dec 16 2008, 11:23
Post #12





Group: Members
Posts: 2435
Joined: 9-October 05
From: Dormagen, Germany
Member No.: 25015



The ReplayGain Value is targeting at an average loudness impression which has to be pretty low (compared to pop/rock music on CD) in order to be able to achieve this loudness target also with tracks of rather low loudness on average but strong peaks within.
As loudness of usual pop/rock CDs usually is very high RG value easily is -7.0 db or below.

This has nothing to do with reducing loudness for the purpose of preventing clipping. For this purpose a value pretty close to 0 usually is sufficient.

I personally use mp3Gain after encoding for achieving both goals. This eliminates the (very small) error of preprocessing the track before encoding and thus keeps the full resolution of the input for the encoding process. It makes the encoding result indepent of specific RG playback features of the DAP used, and I can take care of clipping in case I want to (I usuallly do).

This post has been edited by halb27: Dec 16 2008, 11:27


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th September 2014 - 00:29