IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
Two stupid(?) questions about LAME
BFG
post Jul 22 2012, 00:22
Post #1





Group: Members
Posts: 206
Joined: 22-July 12
Member No.: 101637



Hello all. As you can see, I'm new to the boards, but have perused them as a guest for some time.

I'm still trying to learn the ins and outs of audio archiving, and after doing considerable reading I've started archiving my CD collection with LAME, using the -V0 and -q0 (highest quality VBR) settings.


I have two (potentially stupid) questions for those more experienced than I:
(1) Do you see any point in recompressing my CDs using LAME 3.99.5? The vast majority of them are already compressed with 3.98.4. 3.99.5 seems to give a small file increase on the higher quality settings, but I'm really only concerned about the audio quality.


(2) I've noticed that LAME VBR always uses MPEG 1-Layer III bitrates (32, 40, 48 ... 320), presumably because CDs are always at a 44.1kHz sample rate. Would it be possible to combine MPEG 1 and MPEG 2/2.5 (8, 16, 24...144, 160) bitrates in the same file? If so, would those be readable by most players? And what about using freeformat options e.g. 288 or 640 kbps?
I'm thinking that allowing MPEG 1 and MPEG 2/2.5 in the same file, if that's possible, would allow VBR files to be a bit smaller with no quality loss - since silent sections, for example, could be encoded at 8 kbps instead of 32. And it'd be nice to have freeformat options above 320 kbps available since this is for archiving.
Go to the top of the page
+Quote Post
Soap
post Jul 22 2012, 00:50
Post #2





Group: Members
Posts: 1016
Joined: 19-November 06
Member No.: 37767



Why in this day of cheap storage would you "archive" in a lossy format?

Why if you have already decided, not only to "archive" in lossy, decided to "archve" in the most audibly problematic of lossy formats? To the point where you're pissing over the most insignificant of details.

An expensive external hard drive is $200 for 1TB

That should hold ~2500 FLAC rips if my math is correct.

You want two drives (one for backup).

That's sixteen cents per CD to store in FLAC.

Mind you it would be only a hair less than half that to do it in MP3.

So we'll be generous and say the delta is ten bloody cents per CD rip...

EDIT: Forgot a key word. wink.gif


This post has been edited by Soap: Jul 22 2012, 00:51


--------------------
Creature of habit.
Go to the top of the page
+Quote Post
lvqcl
post Jul 22 2012, 01:00
Post #3





Group: Developer
Posts: 3411
Joined: 2-December 07
Member No.: 49183



(0) http://wiki.hydrogenaudio.org/index.php?title=LAME:
QUOTE
For archiving, only lossless formats like WavPack, FLAC, etc. are ideal; they will preserve the audio with no changes, sample-for-sample, regardless of encoder settings. In contrast, lossy formats like MP3 are designed to save space by changing the audio in subtle, often imperceptible ways, even at the encoder's maximum settings.


(1) I can't see any reason for re-ripping, usually 3.98.4 -V0 isn't better than 3.99.5 -V0.

(2a) About MPEG 1 and MPEG 2/2.5 in the same file: AFAIK there are no encoders that can do this.
(2b) Freeformat is not supported by most players.
Go to the top of the page
+Quote Post
BFG
post Jul 22 2012, 01:03
Post #4





Group: Members
Posts: 206
Joined: 22-July 12
Member No.: 101637



QUOTE (Soap @ Jul 21 2012, 18:50) *
Why in this day of cheap storage would you "archive" in a lossy format? ]

Heh, I should have guessed that the first response would be questioning why I went lossy instead of lossless!

There are two reasons. First, the near-universal compatibility of MP3s; and second, because frankly I can't tell the difference between a -V0 -q0 MP3 and an AAC or ATRAC, even when it's played on high-end equipment. I've tried--several times--using ABXY tests. Though to tell the truth, I may redo everything in AAC, ATRAC or FLAC before I'm done anyway.

So...just humor me on the MP3 questions, mkay?

EDIT: Thanks for the responses Ivqcl.

This post has been edited by BFG: Jul 22 2012, 01:03
Go to the top of the page
+Quote Post
Soap
post Jul 22 2012, 01:08
Post #5





Group: Members
Posts: 1016
Joined: 19-November 06
Member No.: 37767



QUOTE (BFG @ Jul 21 2012, 19:03) *
First, the near-universal compatibility of MP3s; and second, because frankly I can't tell the difference between a -V0 -q0 MP3 and an AAC or ATRAC, even when it's played on high-end equipment.


1 - If you can't hear the difference why are you splitting hairs about fringe behaviors of the encoder?

2 - If you can't hear the difference why is a 640kb frame needed?

3 - If the near-universal compatibility is really a reason why are you asking about incompatible variants?

Rip to lossless, and transcode to lossy upon transfer to your DAP/Phone/Car for the next fiveish years. After that your portable devices will hold enough to make the transcoding step unneeded.

This post has been edited by Soap: Jul 22 2012, 01:09


--------------------
Creature of habit.
Go to the top of the page
+Quote Post
BFG
post Jul 22 2012, 01:13
Post #6





Group: Members
Posts: 206
Joined: 22-July 12
Member No.: 101637



QUOTE (Soap @ Jul 21 2012, 19:08) *
1 - If you can't hear the difference why are you splitting hairs about fringe behaviors of the encoder?

2 - If you can't hear the difference why is a 640kb frame needed?

3 - If the near-universal compatibility is really a reason why are you asking about incompatible variants?

Rip to lossless, and transcode to lossy upon transfer to your DAP/Phone/Car for the next fiveish years. After that your portable devices will hold enough to make the transcoding step unneeded.

To be perfectly honest, it was more curiosity than anything smile.gif
And I wasn't completely sure that these were incompatible variants--the reading I'd done indicated they probably were, but I thought perhaps the sources I'd read were out of date.

Anyway, thanks for answering my questions. Now I just need to read up on which of the lossless compression codecs to use when/if I do that...If you have an opinion I'm all ears, so to speak!
(Encoding time is of no consequence to me...I'm interested in whichever lossless codec compresses best without an insane decoding time, and is at least fairly widespread.)

This post has been edited by BFG: Jul 22 2012, 01:19
Go to the top of the page
+Quote Post
soundping
post Jul 22 2012, 07:02
Post #7





Group: Members
Posts: 39
Joined: 3-February 12
Member No.: 96900



@ BFG

Have you seen this page?
CODE
http://wiki.hydrogenaudio.org/index.php?title=LAME


CBR will give you the best compatibility. But.... VBR will give you the best audio quality for MP3 format.

Stay away from ABR and Free Format. ohmy.gif
Go to the top of the page
+Quote Post
JJZolx
post Jul 22 2012, 07:33
Post #8





Group: Members
Posts: 397
Joined: 26-November 04
Member No.: 18345



QUOTE (BFG @ Jul 21 2012, 17:22) *
(1) Do you see any point in recompressing my CDs using LAME 3.99.5? The vast majority of them are already compressed with 3.98.4. 3.99.5 seems to give a small file increase on the higher quality settings, but I'm really only concerned about the audio quality.


From the responses above, you don't have your library ripped to a lossless format. That would mean not only "recompressing" your CDs, but reripping them as well. Don't bother. That's a lot of work for relatively little benefit. Or perhaps you were thinking of taking the 3.98.4 encodedMp3 files, decoding them, and then re-encoding them using LAME 3.99.5? That would give you files of worse quality than you have now, even if LAME 3.99.5 was far superior to 3.98.4, because you'll have put the audio through two lossy encodings.

That highlights the biggest problem with ripping your CD collection and storing it only in Mp3 or another lossy format. Even if you can't tell the difference between the Mp3s and the original CDs, if you _do_ at some point want to re-encode your music using a beter Mp3 encoder, or maybe to a lower bitrate/quality Mp3 for use in portable players, you're stuck. That's why many people encourage ripping and storing the CDs in a lossless format like FLAC, from which you can encode, or re-encode to your hearts' delight, with no additional work on your part, and no further loss in quality.
Go to the top of the page
+Quote Post
kornchild2002
post Jul 22 2012, 12:59
Post #9





Group: Members
Posts: 2080
Joined: 8-April 05
From: Cincinnati, OH
Member No.: 21277



QUOTE (soundping @ Jul 22 2012, 00:02) *
CBR will give you the best compatibility. But.... VBR will give you the best audio quality for MP3 format.


I don't think VBR compatibility is going to be problematic. A device still pops up from time to time having issues with Lame VBR mp3 files but they are very few and far between the amount of players/programs that play them back just fine. VBR compatibility wouldn't be on my "worry list" (at all) when deciding what Lame setting to use.
Go to the top of the page
+Quote Post
Porcus
post Jul 22 2012, 14:32
Post #10





Group: Members
Posts: 1895
Joined: 30-November 06
Member No.: 38207



QUOTE (BFG @ Jul 22 2012, 02:03) *
frankly I can't tell the difference


Then why on earth re-rip and re-encode?


Re CBR for compatibility, in case that should ever be a problem: it is possible to convert between VBR and CBR without quality loss, using mp3packer. That's a utility which doesn't decode and re-encode, merely reorganizes the frames.


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
greynol
post Jul 22 2012, 17:09
Post #11





Group: Super Moderator
Posts: 10022
Joined: 1-April 04
From: San Francisco
Member No.: 13167



QUOTE (soundping @ Jul 21 2012, 23:02) *
CBR will give you the best compatibility. But.... VBR will give you the best audio quality for MP3 format.

Will VBR give you better quality than 320 kbit CBR? How did you determine this?

If CBR and VBR both managed to give transparent results how can you claim one provides better quality than the other?

The answer is you can't! As such, silly generalizations such as this should be dismissed.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
Porcus
post Jul 22 2012, 17:35
Post #12





Group: Members
Posts: 1895
Joined: 30-November 06
Member No.: 38207



It is maybe fruitful to point out what is correct, and merely not what is wrong: VBR aims at maximizing quality at whatever the average bitrate output becomes (which is not the same as to say “a given predetermined average bitrate”), and for every given CBR file, there is a VBR file which does indeed achieve the same quality without increasing size.


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
halb27
post Jul 22 2012, 20:49
Post #13





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



QUOTE (Porcus @ Jul 22 2012, 18:35) *
... for every given CBR file, there is a VBR file which does indeed achieve the same quality without increasing size.

As long as you're not talking about converting a CBR320 file to a VBR file using mp3packer (a procedure which doesn't change the audio data) that's not correct. The CBR and VBR audio data creation processes are different. Quality can be better with -V0 or CBR 320 depending on the sample (proven fact according to corresponding HA threads). Maybe there's a quality bias towards one of the methods (historically contributed to CBR 320 by most people), but nobody knows especially as with 3.99.5 -V0 quality was further increased.

This post has been edited by halb27: Jul 22 2012, 20:54


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
greynol
post Jul 22 2012, 21:06
Post #14





Group: Super Moderator
Posts: 10022
Joined: 1-April 04
From: San Francisco
Member No.: 13167



I thought I read that the CBR and VBR modes now share the same psychoacoustic model in 3.99.

I can't speak for Porcus, but I do think he was alluding to mp3packer, as it seems discussion about it has increased lately. Lastly, he was quite right in providing a correct answer rather than getting annoyed with flawed information as I had done.

smile.gif

This post has been edited by greynol: Jul 22 2012, 21:07


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
Porcus
post Jul 22 2012, 22:13
Post #15





Group: Members
Posts: 1895
Joined: 30-November 06
Member No.: 38207



QUOTE (halb27 @ Jul 22 2012, 21:49) *
QUOTE (Porcus @ Jul 22 2012, 18:35) *
... for every given CBR file, there is a VBR file which does indeed achieve the same quality without increasing size.

As long as you're not talking about converting a CBR320 file to a VBR file using mp3packer (a procedure which doesn't change the audio data) that's not correct.


Logic: Best VBR algorithm is at least as good as (and likely better than) CBR-->repack is at least as good as (and usually better than) CBR.


I actually wrote a couple of lines on why mp3packer is a sufficient condition to justify the claim, but deleted them in order not to confuse the discussion with anything that could be read as a recommendation to create VBRs in that particular way. Obviously, when for once I tried to avoid unnecessary nitpickery, I failed. I'll remember that wink.gif


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
halb27
post Jul 22 2012, 22:22
Post #16





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



@greynol:
Yes, somebody recently wrote that CBR and VBR mode share the same psychoacoustic model in 3.99, and IIRC he referred to the change log. I just looked up the change log but could not find a corresponding entry.
Moreover, as I know a bit about the Lame source code, I don't know what the sentence 'share the same psychoacoustic model' means. Sure there's a lot in common with the CBR and VBR audio data creation process, but this doesn't change the fact that the corresponding audio data streams are significantly different.

@Porcus:
OK, you talked about using mp3packer. That's a correct statement of course, but it has nothing to do with Lame's CBR and VBR mode.

This post has been edited by halb27: Jul 22 2012, 22:28


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
AliceWonder
post Jul 22 2012, 22:32
Post #17





Group: Members
Posts: 119
Joined: 13-July 12
From: California
Member No.: 101393



If compatibility is what you are worried about then flac is the most compatible.

You can not play flac on as many devices but it has a FOSS license that allows it to be compiled and distributed for any platform and it can be included in other software as well.

No matter what computer platform you use, you will almost certainly be able to get a legal and free flac encoder / decoder that you can then use to create whatever lossy format you may need.

MP3 is controlled by software patents that are a problem in some countries like the US. These patents still have about 5 years left on the last of them.

This patent issue prevents mp3 from playing on some platforms. For example, FireFox and Opera will not native play mp3.
Like flac, you can get free and often legal decoders for any platform so you can transcode as needed. If you had a need for your audio to play in Opera you could transcode from mp3 to Ogg Vorbis. But that's lossy to lossy. Go with flac and your flac to Ogg Vorbis is lossless to lossy, which is better.

Even though not as many hardware players support flac numerically, it still is the more compatible format because when the need to transcode does arise (and it always will at some point) it decode of the flac is free and the transcode does not involve lossy to lossy.

flac also supports better tagging than ID3 (used by mp3) and is thus superior for archival purposes where you want information about the file stored with the file.

This post has been edited by AliceWonder: Jul 22 2012, 22:33
Go to the top of the page
+Quote Post
Porcus
post Jul 22 2012, 22:47
Post #18





Group: Members
Posts: 1895
Joined: 30-November 06
Member No.: 38207



Are you really suggesting that Lame's VBR mode is outperformed by Lame CBR --> mp3packer (for same bitrate)?


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
halb27
post Jul 22 2012, 23:02
Post #19





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



If you're addressing me: No, I don't, and I can't see I've written something like this. Personally I'm into -V0 (resp. my 3.99.5 -V0+ variant which is a bit more demanding than -V0).

This post has been edited by halb27: Jul 22 2012, 23:12


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
Porcus
post Jul 22 2012, 23:36
Post #20





Group: Members
Posts: 1895
Joined: 30-November 06
Member No.: 38207



QUOTE (halb27 @ Jul 23 2012, 00:02) *
If you're addressing me: No, I don't, and I can't see I've written something like this. Personally I'm into -V0 (resp. my 3.99.5 -V0+ variant which is a bit more demanding than -V0).


Yes I was, sorry for not quoting.

The logic is that as long as Lame VBR is at least as good as mp3packed CBR (at the same bitrate), then it is at least as good as CBR (at the same or slightly higher bitrate), and that would – under the hypothesis (the 'as long as' part) establish my claim.

The 'then' part is trivially true, as it is the very same signal. Therefore, in order to invalidate my claim, it would have to be due to the hypothesis failing, and Lame's optimized-for-quality VBR algorithm not even being on par with repacked CBR, which is not optimized for quality. Hence the question.


Of course the quality optimization need not be perfect in the sense that no signal can fool it (that's why a model is called a model – it isn't the real thing), but it would be a surprise if the effort of optimized VBR were totally (edit) more often than not in vain.

This post has been edited by Porcus: Jul 22 2012, 23:48


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
kornchild2002
post Jul 23 2012, 00:31
Post #21





Group: Members
Posts: 2080
Joined: 8-April 05
From: Cincinnati, OH
Member No.: 21277



QUOTE (AliceWonder @ Jul 22 2012, 15:32) *
If compatibility is what you are worried about then flac is the most compatible.


That seems like a few steps backwards when compared with the compatibility (across software and devices) that mp3 (and even mpeg-4 AAC) offers. I would even question the validity of saying that FLAC is the most commonly supported lossless format since the majority of portable players sold are made by Apple and natively work with ALAC (not to mention third party support across various devices and programs). I am not trying to question FLAC at all but rather I don't understand how it can offer greater compatibility over mp3 especially since every single portable audio player, smartphone, Blu-ray player, computer, the two main gaming consoles (soon to be three), tablet, and the majority of dedicated DVD players (if people are still buying those) all natively work with mp3 files whereas a small percentage of those work with FLAC.
Go to the top of the page
+Quote Post
AliceWonder
post Jul 23 2012, 02:53
Post #22





Group: Members
Posts: 119
Joined: 13-July 12
From: California
Member No.: 101393



They are compatible with ALAC today, now, but AAC has patent issues just like MP3 does, and I believe they will last even farther into future than MP3 patents, which restricts devices and software that support the format to those who either ignore the patents, are sold in countries where there aren't patents, or ignore the patents (like happened with MP3 during it's initial decade).

You might have to download software to decode flac on some platforms but that software is both free and readily available just about anywhere.

Can I play an ALAC file on Linux?

I purchased the fluendo plugins so maybe I can, but without that purchase it is only possible with third party libraries that can not legally be distributed by my distribution vendor, meaning either I have to compile myself and watch for security patches myself or trust a third party repository in another country that unlikely has a commercial entity behind it.

That's a problem that doesn't exist with flac, where bona-fide companies can choose to distribute support with their products (like foobar2000), far more trust-able than a small group who run a server outside the US for explicit purpose of circumventing patent distribution laws.

I believe, btw, there are quicktime plugins for flac that make flac work in QuickTime and thus iTunes, no?

This post has been edited by AliceWonder: Jul 23 2012, 02:55
Go to the top of the page
+Quote Post
RobertoDomenico
post Jul 23 2012, 04:26
Post #23





Group: Members
Posts: 87
Joined: 16-November 11
Member No.: 95208



Getting Flac to play in iTunes is a total pain, even then it doesn't work well. Not worth the effort. The fact is that more people have software and devices that play ALAC than Flac. MP3 is still king for compatibility.
Go to the top of the page
+Quote Post
AliceWonder
post Jul 23 2012, 04:36
Post #24





Group: Members
Posts: 119
Joined: 13-July 12
From: California
Member No.: 101393



You can still install the command line client and decode flac in OS X.
ALAC won't decode for me, apparently not even with the patent infringing libraries, not yet anyway.

So you can decode flac more places than alac. Maybe not OOB w/o installing additional software, but installing additional software is not only an option but is free - which it isn't with ALAC.
Thus flac is more compatible.

EDIT - looks like some recent ffmpeg do support alac, but it does not appear that GStreamer does.

This post has been edited by AliceWonder: Jul 23 2012, 04:42
Go to the top of the page
+Quote Post
Glenn Gundlach
post Jul 23 2012, 06:33
Post #25





Group: Members
Posts: 370
Joined: 19-April 08
From: LA
Member No.: 52914



1: Last month I bought a 2TB Hitachi drive for $110 + tax.
2: An archive possibility is to use BluRay discs - 23 GB for under a buck. Writers under a hundred. You can likely get 40 CDs in FLAC on 1 1$ disc. Hard to beat that price
In my car I use 320 KBit MP3s on a $20 32GB flash drive but the 'masters' are stored as FLAC.

Go to the top of the page
+Quote Post

2 Pages V   1 2 >
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: 20th October 2014 - 19:42