Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Storing MP3 files with Foobar2000 and Halb27's lame 3995m (Read 5047 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Hi guys,
I'm Alex from Italy and I'm quite a newbie in music encoding and that's why I'm asking help from you!
I think I'm right here, but eventually sorry if the question is not in right place.

Preamble: (if you want you can skip to "Questions")

[blockquote]The point is that I have too much music in Flac for my tastes, so I don't want to keep the loseless format for all of my music. And also in this way I can save some space (I need it).

Obvious that for the music I really love (not few!) I just keep it in single flac files, sometimes using foobar2000 to split a unique loseless big file (.wav .ape .flac etc) into several flac tracks, with the help of the provided .cue file, hoping that this method is safe and still keep quality unalterated... loseless = loseless isn't it?

For other music such as certain old 60/70s music, that is not so good in production so doesn't need maxium quality of flac, or such as music that I don't like too much but still want to keep (girlfriend's music), I'm still very satisfied with mp3 quality instead of Flac.
So I have encoded some of my music from Flac to Mp3 using Foobar2000 (that is also the program I use to listen to music from pc with win8.1 x64) and mp3 @320kbps setting fomr maximum quality, and then after a listening test (well...not always) I deleted the original loseless files.

I'm using latest lame: v3.99.5 x64 "standard" for windows.

But then in last months I've moved from 320 cbr to "V0" vbr, having read that vbr in some way treats the sound better & in a more clever way than cbr, since it is a different encoding procedure.
And I did also a little variation to the default Foobar's mp3 parameters, since I was  looking for a better quality of V0, in some words very close to the cbr 320, very close to the highest quality that is possible to obtain using VBR (or that was my intent).

-S --noreplaygain -V0 - %d -b 96 -B 320 -F

In this way I was trying to force a minimum/maxium bitrate range, and in fact I saw that these mp3 files had better quality than the standard V0 files, since they resulted with higher average bitrates.
Don't know if this is quite correct or better than cbr@320, and never tested with ABX (I never used this ABX tool mainly because of lack of time and some lack of interest).
My mp3 are sounding very good, that's fine for me.

But now I've "accidentally" entered this forum and moreover the world of halb27's tweaked Lame, and would be very glad if someone of you could tell me if I can safety use halb's "lame3995m" instead of official Lame.
Not speaking about halb27 "lame3100m" beacuse I've read that is not based on a final/stable version of Lame.
For "safe" I mean also that the encoded mp3s are correctly processed so that they can be reproduced with no problems at all from other players, like sansa clip portable player and car's radio, etc. And obvious, that quality will be a little better or at least as good as the standard lame 320cbr or "my" vbr discover, "V0 -b 96 -B 320 -F", that was my intent and, from what I've understood, also Halb27's one.[/blockquote]

Questions:

So the main question is this one:
1) Is it safe to use halb27's "lame3995m" for final storage of mp3 files? (I mean safe as using the default lame.exe v3.99.5 and other things just said above)

To achieve best quality mp3 files from flac, so that I can delete the flac (or other loseless format) files, I managed to use halb's lame3995m.exe with these parameters (pasting from foobar2000 interface):

-S --noreplaygain -V0 --cvbr 0 -Y - %d

So here are the other questions:

2) should I leave "-Y" parameter always on?

3) does adding the -h parameters helps to improve quality? (I've found somewhere "-V0 --cvbr 0 -h" as "the most insane setting we can ever have")

4) Other parameters I've found and I'm in doubt with:
"-V1 --insane_factor 0.75" (halb27's signature! maybe his favorite setting...?)
vs
"-V0 --insane_factor 1.0"
vs
"-V0 --cvbr 0"

I've tried all 3 methods and I can say only that file size is very similar (I'm not using mp3packer), but really don't know the main thing: what's the difference between "insane factor" and "cvbr"?

5) what about using or not "lowpass" factor? eg: -V0 --cvbr 0 --lowpass -1 or 19500
I think one user of this forum said that "-V0 --cvbr 0 --lowpass -1" is the highiest quality/accuracy setting for him... but again, I don't know anything about lowpass parameter.

6) Am I wright when I split big loseless file +cue file into tracks using foobar2000 flac encoder (see first part of my post)?

Sorry I understand these can be very basic questions, and not all related to halb27's lame. Sorry also for my not perfect english and moreover for having been so long, I know that shortness is not one of my ables!
Thank you

Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Reply #1
As for your questions:

1) I can't see why it shouldn't be safe to use lame3995m. However if you don't like the idea of using a Lame variant instead of the original go ahead. lame3995m has a quality advantage only on very rare occasion.

2) When using high bitrate as you want to you don't have to care about the frequency range above 16 kHz. So I wouldn't use the -Y switch.
My Lame variant uses already a somewhat lower lowpass than does the original Lame (and I wouldn't do it again - at least not for the top quality settings. Not that it's bad for the quality - but it doesn't have a real advantage either).

3) I think this question was answered before on several occasion. Don't use the -h switch, at least not when using VBR.

4) Your question is targeting at more design decisions of mine which have arrived by history and which I consider unnecessary now. There are diiferences in the effect of these settings, but don't expect to hear them.
Long story short: decide upon your -V quality setting as you would with standard Lame, and choose the insane-factor which gives you more peace of mind (and an audibly better quality on very rare occasion).
I guess -V0 --insane_factor 1.0 meets your intentions.

5) see 2). If you want standard Lame's -V0 lowpass behavior for lame3995m use --lowpass -1. lame3995m's -V0 default lowpass is --lowpass 18300. I wouldn't care about that. I can't imagine any quality difference.

6) I have no experience with that but it sounds reasonable.

lame3995o -Q1.7 --lowpass 17

Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Reply #2
I'd start with this:  How much compression do you need (or want)?  Are 320kbps files too big for you?  Is there really a need to make smaller files for the music that you don't care that much about?  There's nothing wrong with choosing 320 if you have the space for it.

If you want to get the smallest possible files with the best sound quality (or sound quality acceptable to you) you'll have to do some ABX tests.

I use V0* because I wanted some compression and lots of compatibility but I wasn't too worried about disc space.    And I don't hear any sound quality problems with V0, so I didn't feel the need to go to 360.  My 160GB iPod classic is about 80% full so at some point I may have to deal with that.  At the rate I'm adding to my music collection the iPod will probably die before I run out of space.    (And, I'm just not concerned with space on my computer hard drives.)

Quote
But then in last months I've moved from 320 cbr to "V0" vbr, having read that vbr in some way treats the sound better & in a more clever way than cbr, since it is a different encoding procedure.
It's "smarter" or more efficient encoding.  As an extreme example, it doesn't use 320kpbs to encode silence or "simple" easy-to-compress sounds.  It only uses the maximum bitrate when the algorithm determines it's necessary.

If you get down to a bitrate where the quality is affected, variable bitrate (with the same average bitrate) will give you better quality than constant bitrate.

Quote
And I did also a little variation to the default Foobar's mp3 parameters, since I was looking for a better quality of V0, in some words very close to the cbr 320, very close to the highest quality that is possible to obtain using VBR (or that was my intent).
You might find a file or two that sounds better at 320 than at V0.  I'd say there's no practical reason to use anything in-between.  If you feel V0 or 320kbps isn't good enough it's best to go with FLAC or ALAC.

Quote
in fact I saw that these mp3 files had better quality than the standard V0 files, since they resulted with higher average bitrates.
Yes, the maximum MP3 bitrate is 320kbps and V0 is not using the maximum bitrate all of the time.  But, higher bitrate doesn't "prove" better sound  quality.  We already know MP3 is lossy and every single sample (i.e. 44,100 samples per second) is different from the uncompressed original, no matter what the bitrate. 

We cannot say a 320bps file is "better" than a 160kbps file if we can't hear the difference, or if both files sound identical to the uncompressed original (in a proper-scientific listening test).    You might be able to show that a higher bitrate (or higher quality VBR setting) is mathematically closer to the original, but if you want to go down that road, just go lossless and make it mathematically perfect (and audibly perfect).






* If I was starting over, I'd probably go with a FLAC archive and AAC for listening (my current archive is the original CDs unless the original was MP3).  AAC seems to be as universally compatible as MP3 and it seems to have less trouble with gapless playback, and there might be cases where it results in  better sound quality.  But, whenever I thought I was hearing an MP3 artifact (with one of my V0 files), It's turned-out the same defect/artifact was on the original CD, so I wouldn't switch to AAC for sound quality reasons.  (And, I've never done ABX tests.)









Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Reply #3
Thank you very much for reply.

@halb27

I really like the idea to be able to use lame's VBR with settings close to CBR@320kbps, so to take advantage of the better encoding process.
And since I wanted something more than the "standard" lame V0, I'm very happy to have found it here, with your alternative version. So many thanks for you work!

About the questions, I have some further argumentation:

1) my question was about the stable/unstable thing, since I saw your 3100m lame ver. and I thought that one was based an "alpha" build and I wanted confirmation about lame 3995m being the stable one.

4) ok I'll second your suggestion, but reading things that you wrote quite time ago I saved this to remind me the behaviour of your lame.exe:
Quote
V0's default cvbr level is 4.0. Using the --cvbr x option overrides the default cvbr level.
Using a cvbr level better than 4.0 together with -V0 or -V1 can improve those small issues which still exist when using -V0.
E.g.: -V0 --cvbr 0 (ca 316 kbps) is an extremely high quality alternative to cbr 320.

Can I still benefict of the improvement with -V0 --insane_factor 1.0 or is this a different way to encode mp3 than --cvbr 0?
Believe me, I can and I want to trust your words with my eyes closed, but if you could spend 2 words about the differences I would really appreciate it (still knowing that my ears will never found any!)

5) Here I have a little misunderstanding:
if "lowpass -1" means disabled -> default lame -V0's lowpass behaviour = disabled? or does "lowpass -1" mean that with that I'm using default lame V0's value? If yes, is it 19500 and you lowered it to 18300 in your 3995m version? (again, as you said, I understand that there are no hearable differences, but I just want to understand this simple thing, thank you!)

6) in more words, I mean: is it true that no degrees can occour if, for eg I do several times the encode to-from one big loseless file into multiple loseless files? Like from one flac to more flac files, then from the multiple flac just created again into one flac etc etc.
Is it working in some way like compression with zip files, so that I can zip&unzip to infinite without degree of the containt? (obvious anyone can answer to this common question, sorry for the OT)

/////////////////////////

@DVDdoug thanks for answering, I will reply tomorrow because now my eyes are closing...

Thanks in advance to everybody and have a good night.
Alex

Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Reply #4
If it is just about file size (and not that you need MP3s for you or your GF's player):
You might consider using LossyFLAC. The main thread (I think) at HA can be found here.
Nick did such an amazing job. The resulting (lossy) FLACs (encoded with standard compression) have avg. bitrates of ~440 kbps (so just a little bigger than your 320 kbps MPs), but you still have some benefits of FLAC files, lile gapless playback by design, great tagging support, can easily be converted with other lossless converters of your choice w/o loosing quality. And because of the nature of LossyWAVs compression algorithm the files end up just with a little (shaped) noise added, which is, imho, less prone to artifacts in my ears...

At least it is worth a try...

.sundance.

Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Reply #5
I'm failing to see the point of using CBR when you're constrained in space. Going from FLAC to 320kbps CBR will probably only reduce your space requirements by a factor of 2-3, while abandoning the lossless nature of the files. So if you're abandoning lossless encoding anyway, why not go all the way and use VBR, with a setting like -V4? This will probably result in files of around 160 kbps, which will cut the necessary space in half again, so in total you'd save space by a factor of 4-6.
It's only audiophile if it's inconvenient.

Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Reply #6
I'm failing to see the point of using CBR when you're constrained in space. Going from FLAC to 320kbps CBR will probably only reduce your space requirements by a factor of 2-3, while abandoning the lossless nature of the files. So if you're abandoning lossless encoding anyway, why not go all the way and use VBR, with a setting like -V4? This will probably result in files of around 160 kbps, which will cut the necessary space in half again, so in total you'd save space by a factor of 4-6.

Well I'm not SO contrained in space, in fact I'm still keeping most of my files in FLAC (about 40% of my music). The remaining music is not so important to me, so I'm satisfied with mp3 high-quality, that means at least std V0 VBR or 320kbps CBR.

Sometimes I could hear artifacts and quality degree with V4 and @160kbps or lower. And, if I remember well, also 192kbps cbr was not enough to me.
As said I want to delete the originals, so I want to have a very good file, very close to the originals and with less than a half demand of space.
In term of space, from my experience, I can gain about 2/3 of space with my old V0 high quality settings. A 600mb Flac files come down to 200mb. For me it's a good compromise for these non important files.

Anyway thank you for suggestions!

@sundance I will give a try with lossyFlac, ty.

Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Reply #7
...About the questions, I have some further argumentation:

1) my question was about the stable/unstable thing, since I saw your 3100m lame ver. and I thought that one was based an "alpha" build and I wanted confirmation about lame 3995m being the stable one.

4) ok I'll second your suggestion, but reading things that you wrote quite time ago I saved this to remind me the behaviour of your lame.exe:
Quote
V0's default cvbr level is 4.0. Using the --cvbr x option overrides the default cvbr level.
Using a cvbr level better than 4.0 together with -V0 or -V1 can improve those small issues which still exist when using -V0.
E.g.: -V0 --cvbr 0 (ca 316 kbps) is an extremely high quality alternative to cbr 320.

Can I still benefict of the improvement with -V0 --insane_factor 1.0 or is this a different way to encode mp3 than --cvbr 0?
Believe me, I can and I want to trust your words with my eyes closed, but if you could spend 2 words about the differences I would really appreciate it (still knowing that my ears will never found any!)

5) Here I have a little misunderstanding:
if "lowpass -1" means disabled -> default lame -V0's lowpass behaviour = disabled? or does "lowpass -1" mean that with that I'm using default lame V0's value? If yes, is it 19500 and you lowered it to 18300 in your 3995m version? (again, as you said, I understand that there are no hearable differences, but I just want to understand this simple thing, thank you!)

6) in more words, I mean: is it true that no degrees can occour if, for eg I do several times the encode to-from one big loseless file into multiple loseless files? Like from one flac to more flac files, then from the multiple flac just created again into one flac etc etc.
Is it working in some way like compression with zip files, so that I can zip&unzip to infinite without degree of the containt? (obvious anyone can answer to this common question, sorry for the OT)


1) lame3995m is based on Lame 3.99.5 which is the current release version. So: yes, this is the stable version.

2) Using --cvbr 0 the minimum bitrate constraints are high. On occasion this can have a negative effect on the size of the bit reservoir. The bit reservoir allows locally for a significantly higher audio bitrate than 320 kbps, and one of the special things my Lame variant does is trying to keep the bit reservoir large. --insane_factor 1.0 has the priority on holding bit reservoir extremely large at the expense of having no significant (theoretical) quality advantage over standard Lame at (rare) times. But that's all theory and the audible quality is not expected to be different.

5) lame3995's --lowpass switch does the same as the original, so lowpass -1 switches the lowpass off which is the default behavior for Lame 3.99.5 -V0.

6) As I said I have no experience with this procedure. I personally would split the files using a wav editor. Sure if you have the cue files already your procedure is easier to do.

I second sundance's proposal for using lossyFLAC. Worth to consider, especially if you can allow for a bitrate ~400 kbps.
lame3995o -Q1.7 --lowpass 17

Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Reply #8
What you can do is use a hybrid lossless method: Lossywav, wavpack hybrid, optimfrog DS..  You have a high quality lossy file for pc / portable use,  typical bitrate is 300..400kbps.  The recovery 'correction file' is stored offline on a remote server, optical media, hdd etc..  This way you rip once as lossless but total size is distributed across different media if space is an issue. The most compatible is the lossyflac as flac has wide h/w player support. Others like wavpack also have support via 3rd party players. For PC playback all are well supported.

 

Storing MP3 files with Foobar2000 and Halb27's lame 3995m

Reply #9
ok thank you to everyone for great answers!

I tried lossyflac in foobar and it works like a charm for me, I left parameters as the example, just with my directory:
/d /c c:\SW\"FLAC_v1.3.1-x64"\lossywav - --quality standard --silent --stdout|c:\SW\"FLAC_v1.3.1-x64"\flac - -b 512 -5 -f -o%d --ignore-chunk-sizes

...I hope they are all ok.

So I'm going to encode* some of my music with "standard" or maybe "high" quality of lossyFLAC, the rest will stay just loseless.

Then, when I have to copy in my sansa clip, to save space I will do copy of flac and re-encode with "portable" quality.
Yes, sansa can read also original flac, but in this way I can put much more songs.

For radio car in which I can play only mp3, I will go with the best settings for mp3 that I found, thnx to halb27:
-S --noreplaygain -V0 --insane_factor 1.0 --lowpass -1 - %d

*maybe I will wait for lossyWAV v1.4.1, even though I didn't read the full thread to search for relevant changes:
https://www.hydrogenaud.io/forums/index.php...st&p=910092


Thank you again,
Alex