IPB

Welcome Guest ( Log In | Register )

5 Pages V  < 1 2 3 4 5 >  
Reply to this topicStart new topic
Why’s FLAC ‘the’ lossless codec? Is it future-proof(able)? Comparisons, [TOS #6: was “Future proof lossless audio/codec” in General Audio]
Porcus
post Jun 25 2012, 01:01
Post #51





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



@ Bryant:

Thanks for enlightening.

And well maybe this is the weirdest reason for using WavPack, but it probably illustrates my reasoning why this is a natural monopoly situation (well, Apple might create their own market though). For those 50 hours of music which I wanted to flag as 'do not play except in foobar2000' (that includes the DTS CD too), I picked my second choice – but my point is, being everyone's second choice, does not pay off in terms of market share. When it comes to sausages, it does, because you don't want to eat the same all the time. When it comes to a file format, it doesn't.

(Except in terms of respectful thumbs-up from geeks. I suppose there are quite a few people who think WavPack is cool, but don't use it. Including myself, until I fairly recently found a (laughable?) reason to ditch my single-format principle.)


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
db1989
post Jun 25 2012, 06:53
Post #52





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (Dario @ Jun 24 2012, 20:21) *
I listen mostly to neofolk, and the results I get are quite different than the ones you do. Here’s the compression for the album “Forlatt” by Vŕli […] do you know how much difference that is (tip: it’s over 20%)?
QUOTE (Porcus @ Jun 24 2012, 21:25) *
Those figures of yours (wow ...) don't state uncompressed size. If you ripped from CD, then bitrate (per second) is probably a better figure to state, as the uncompressed is 1440.
1411 kbps, surely? wink.gif

But yeah, it would be good to have more information, such as uncompressed size/bitrate and a sample. On which note:
QUOTE (Dario @ Jun 24 2012, 20:21) *
If you don't believe me, I can upload the album so you can check it out yourself. I hope you wouldn’t mind.
Hydrogenaudio limits sharing of copyrighted material to samples for use in demonstration/identification, which can be a maximum of 30 seconds long, so please don’t link any full album or even song (at least not publicly).

This post has been edited by db1989: Jun 25 2012, 06:56
Go to the top of the page
+Quote Post
skamp
post Jun 25 2012, 09:31
Post #53





Group: Developer
Posts: 1442
Joined: 4-May 04
From: France
Member No.: 13875



QUOTE (IgorC @ Jun 24 2012, 00:22) *
Is 3% compression gain significantly better? ( TAK vs FLAC)


Well, I measured the difference on my music collection, which turns out to be 2.19% on average. Not quite as significant as I would have thought.


--------------------
See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post
Dario
post Jun 25 2012, 11:39
Post #54





Group: Members
Posts: 158
Joined: 20-September 11
Member No.: 93842



Here’s a 30-second sample of the album I was talking about. I’ve no idea why it’s such an “exotic” case—but it is.
Go to the top of the page
+Quote Post
lvqcl
post Jun 25 2012, 11:45
Post #55





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



Apparent lowpass at 13...14 kHz and other signs of lossy encoding.



This post has been edited by lvqcl: Jun 25 2012, 11:50
Go to the top of the page
+Quote Post
skamp
post Jun 25 2012, 11:46
Post #56





Group: Developer
Posts: 1442
Joined: 4-May 04
From: France
Member No.: 13875



QUOTE (skamp @ Jun 25 2012, 10:31) *
Well, I measured the difference on my music collection, which turns out to be 2.19% on average. Not quite as significant as I would have thought.


Correction: a 3.52% improvement of TAK over FLAC (derived from the TAK to FLAC ratio, not FLAC to WAV minus TAK to WAV). See the linked thread.


--------------------
See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post
Porcus
post Jun 25 2012, 11:52
Post #57





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



The Vŕli upload has a peak of only 0.82, and is from a lossy source. Edit: lvqcl beat me at the latter.

CODE
auCDtect: CD records authenticity detector, version 0.8.2
Copyright © 2004 Oleg Berngardt. All rights reserved.
Copyright © 2004 Alexander Djourik. All rights reserved.
------------------------------------------------------------
Processing file: [V…li {2004} ~ Forlatt ~ 03 ~ Et ensomt minne.wav]
Detected average hi-boundary frequency: 1.933682e+004 Hz
Detected average lo-boundary frequency: 1.443311e+004 Hz
Detected average hi-cut frequency: 1.823435e+004 Hz
Detected average lo-cut frequency: 1.397679e+004 Hz
Maximum probablis boundary frequency: 2.153600e+004 Hz
Coefficient of nonlinearity of a phase: 9.019672e-002
First order smothness: 8.209877e-001
Second order smothness: 6.141975e-001

------------------------------------------------------------
This track looks like MPEG with probability 100%

------------------------------------------------------------
Final Conclusion:
------------------------------------------------------------
These tracks looks like MPEGs with probability 100%


This post has been edited by Porcus: Jun 25 2012, 11:53


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
Dario
post Jun 25 2012, 12:00
Post #58





Group: Members
Posts: 158
Joined: 20-September 11
Member No.: 93842



QUOTE (lvqcl @ Jun 25 2012, 12:45) *
Apparent lowpass at 13...14 kHz and other signs of lossy encoding.

http://i.imgur.com/tfEKB.png

Alright then. This is a demo recording, and while I can guarantee that it was ripped from an original copy (it’s also verified by AccurateRip), I’d no idea that it was sourced from lossy files, but I’m not surprised, because it is, as I said, a demo recording.

Thank you for the clarification.

On a side note, I have a bunch of other albums that I know to be lossily-mastered (all kinds of stuff happens in the “underground” scene…), and I just realized that I get pretty much the same results (over 15% difference in compression). The album I checked now was bought as WAV from here (but is mastered from lossy files). I guess that settles it. Thanks again.

This post has been edited by Dario: Jun 25 2012, 12:03
Go to the top of the page
+Quote Post
Porcus
post Jun 25 2012, 12:24
Post #59





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



I am not surprised that a demo from a one-man-band is kept as .mp3 and then pressed to CD if someone offers to release it.

Earlier in the thread*, TBeck warns against that comparison where his codec performed also outperformed FLAC by larger margin than usual, on the grounds of the test corpus which included lossy sources.

(That said, I am a bit fascinated by the fact that lossless encoders fail so miserably at packing mp3's back to anything near mp3 size. They are obviously very far from the information content on those particular samples. Then on the other hand, there are good reasons why developers of lossless codecs/encoders do not bother to tune them to for efficiency on cases everyone advises against.)

This post has been edited by Porcus: Jun 25 2012, 12:26


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
db1989
post Jun 25 2012, 12:36
Post #60





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (Porcus @ Jun 25 2012, 12:24) *
(That said, I am a bit fascinated by the fact that lossless encoders fail so miserably at packing mp3's back to anything near mp3 size. They are obviously very far from the information content on those particular samples. Then on the other hand, there are good reasons why developers of lossless codecs/encoders do not bother to tune them to for efficiency on cases everyone advises against.)
I’m probably oversimplifying (as is customary!), but I think it’s important here to distinguish between entropy/information as is in theory vs. as it is perceived. Lossy encoding adds noise, distortion, and other features that cannot be classed as information in the sense of something that has any use – but this nonetheless is not something that can be used as a shortcut by a subsequent lossless encoder, which has no way of identifying that it arose in such a way and has no choice but to store it (in all its content-free glory).

Also (and as you implied), there’s little point in making lossless encoding better at representing something that has already been processed by a lossy codec. Transcoding is bad, m’mkay? wink.gif

This post has been edited by db1989: Jun 25 2012, 12:50
Go to the top of the page
+Quote Post
lvqcl
post Jun 25 2012, 13:19
Post #61





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



Half a year ago I took 7 albums from my music collection and encoded them to various lossless formats. Max. difference between FLAC -8 and TAK -p4 is 3.64%, min. difference is 2.43%, average is 3.15%.

Also, the whole test (44.1/16/stereo; CPU = Intel i7 950; no multithreading, no GPU encoding; ALAC: QT 7.7.0 libraries via qaac 0.85):

encoding speed vs. compression ratio:


decoding speed vs. compression ratio:


This post has been edited by lvqcl: Jun 25 2012, 14:20
Go to the top of the page
+Quote Post
smok3
post Jun 25 2012, 13:26
Post #62


A/V Moderator


Group: Moderator
Posts: 1729
Joined: 30-April 02
From: Slovenia
Member No.: 1922



as far as longevity goes, i'd use whatever appears as a decoder in ffmpeg, seems to be:

CODE
DEA D alac ALAC (Apple Lossless Audio Codec)
D A D als MPEG-4 Audio Lossless Coding (ALS)
D A D ape Monkey's Audio
DEA D flac FLAC (Free Lossless Audio Codec)
D A D ralf RealAudio Lossless
D A D tta True Audio (TTA)
D A D wmalossless Windows Media Audio Lossless
D A D wavpack WavPack

ffmpeg version N-40617-g70e9308 Copyright © 2000-2012 the FFmpeg developers
built on May 12 2012

(but do test first if decoding is ok)

p.s. also i would slightly prefer the ones starting with DEA.

p.s.2. full list http://pastebin.com/raw.php?i=e1aWDcDZ
(hopefully i haven't missed any)

p.s.3. not only longevity, this is also a voucher for decoding your audio on almost any platform.

This post has been edited by smok3: Jun 25 2012, 13:44


--------------------
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung
Go to the top of the page
+Quote Post
TBeck
post Jun 25 2012, 13:59
Post #63


TAK Developer


Group: Developer
Posts: 1098
Joined: 1-April 06
Member No.: 29051



QUOTE (Porcus @ Jun 25 2012, 13:24) *
Earlier in the thread*, TBeck warns against that comparison where his codec performed also outperformed FLAC by larger margin than usual, on the grounds of the test corpus which included lossy sources.

Since i have read several reports of commercial CDs containing probably lossy compressed audio, i think it's ok to have a few such files in a larger test corpus, but they should contribute only a bit to the sum results.

QUOTE (db1989 @ Jun 25 2012, 13:36) *
Also (and as you implied), there’s little point in making lossless encoding better at representing something that has already been processed by a lossy codec. Transcoding is bad, m’mkay? wink.gif

I don't think it's totally irrelevant if a codec can compress such files well. Files with very high sampling rates like 192 KHz also "appear" low passed because there is so little natural high frequency content. Accordingly TAK compresses them very well.

This is not always true for files converted from a DSD-source, where the conversion process seems to add a lot of high frequency noise.
Go to the top of the page
+Quote Post
stephan_g
post Jun 25 2012, 16:10
Post #64





Group: Members
Posts: 193
Joined: 6-June 10
From: Bavaria
Member No.: 81240



QUOTE (TBeck @ Jun 25 2012, 14:59) *
This is not always true for files converted from a DSD-source, where the conversion process seems to add a lot of high frequency noise.

It's not the decoding - this is inherent to DSD, being a heavily noise-shaped 1-bit format. Results would be expected to vary depending on how fancy the noise shaper was.

How's TAK's handling of 24-bit files? FLAC doesn't compress these too well.
Go to the top of the page
+Quote Post
pdq
post Jun 25 2012, 16:38
Post #65





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



I doubt that any lossless encoder would do well with 24 bits. Those 8 extra bits are essentially uncompressable, uncorrelated noise.
Go to the top of the page
+Quote Post
benski
post Jun 25 2012, 16:43
Post #66


Winamp Developer


Group: Developer
Posts: 670
Joined: 17-July 05
From: Brooklyn, NY
Member No.: 23375



QUOTE (stephan_g @ Jun 25 2012, 11:10) *
How's TAK's handling of 24-bit files? FLAC doesn't compress these too well.


I suspect that compression of 24-bit PCM as well as higher sample rates could be improved in FLAC without any format-breaking changes. The encoder is non-optimal in these scenarios.

I'd also be curious if improvements from FLAKE could be added, as well as more exhaustive coefficient calculation (or a more modern algorithm). CPU speeds have gone up drastically since FLAC's encoder was developed.

That being said, it's never going to be able to beat TAK or other formats without making format-breaking changes.

As far as future-proofing, it would be nice to add floating-point support, particularly for "studio master" files or synthetically generated files. It would have to be part of a newer format, and it might require someone to write a fixed-point version to be able maintain good platform support like FLAC has today. But it's definitely the main thing "missing" today from FLAC.
Go to the top of the page
+Quote Post
db1989
post Jun 25 2012, 16:49
Post #67





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



Does Josh ever still, or have any intention to ever again, work on FLAC? If not, does anyone else, and/or do projects such as FLAKE have many improvements besides speed? Improvements and additions such as those mentioned by benski sound great; I’m just wondering where they’re going to come from.

[edit]

I now recall seeing recent changelogs from Xiph, but checking these now suggests that almost all of the recent changes have amounted to little more than housekeeping, rather than changes to the format itself. So, I’m still curious.

Also, lvqcl: thanks for the very interesting graphs!

[/edit]

This post has been edited by db1989: Jun 25 2012, 17:00
Go to the top of the page
+Quote Post
JJZolx
post Jun 25 2012, 16:55
Post #68





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



QUOTE (lvqcl @ Jun 25 2012, 06:19) *
Half a year ago I took 7 albums from my music collection and encoded them to various lossless formats.


I assume that the points on the graph for FLAC are the compression levels 0 through 8. Am I reading it correctly, that the encoding speed at -6 is actually _faster_ than -5?

Edit: Actually, I think I'm reading it the wrong way 'round. It looks like compression levels 0 through 8 are plotted right to left. It's interesting that there's essentially zero difference between -5 and -6.

This post has been edited by JJZolx: Jun 25 2012, 17:10
Go to the top of the page
+Quote Post
eahm
post Jun 25 2012, 17:13
Post #69





Group: Members
Posts: 1084
Joined: 11-February 12
Member No.: 97076



QUOTE (stephan_g @ Jun 25 2012, 08:10) *
How's TAK's handling of 24-bit files? FLAC doesn't compress these too well.

QUOTE (benski @ Jun 25 2012, 08:43) *
I suspect that compression of 24-bit PCM as well as higher sample rates could be improved in FLAC without any format-breaking changes. The encoder is non-optimal in these scenarios.

Really? It doesn't even properly handle 24bit? I have few albums in FLAC and 24bit, what do you mean by this?

Going back to the original question, not looking at the 1% better compression and not talking about TAK in every post, what doesn't True Audio have that other formats have? Again, reading the specs it seems the absolute best, please let me understand why I shouldn't convert and keep everything in True Audio.

Can anyone add TAK's details here? http://en.wikipedia.org/wiki/Comparison_of...chnical_details

Thanks.

This post has been edited by eahm: Jun 25 2012, 17:31


--------------------
/lwAsIimz
Go to the top of the page
+Quote Post
Porcus
post Jun 25 2012, 17:31
Post #70





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



QUOTE (pdq @ Jun 25 2012, 17:38) *
I doubt that any lossless encoder would do well with 24 bits. Those 8 extra bits are essentially uncompressable, uncorrelated noise.


I did a test after applying a de-emphasis EQ filter and writing the output to 24-bits. (Which means, there wasn't noise in those 8 extra bits until the EQ moved the original noise in there, so I suppose that filling up with noise from the beginning, would not benefit the figures?) Then I took the FLAC file, reduced to 16 (without dithering) and measured the ratio.

With FLAC -8, the 16 bits filesize was only 52.1% of the size of the 24-bit file. Those extra 8 bits were fairly expensive.

I didn't compute the corresponding ratios for other codecs, but I converted the 24-bit file to other formats in order to see if there was any that would perform 'by eyeballing' unexpectedly better or worse. Nope:

7 761 846 272 bytes - flac -8
7 672 954 880 bytes - WavPack high, x5
7 629 369 344 bytes - Monkey's extrahigh
7 582 380 032 bytes - TAK -p4
7 533 199 360 bytes - ofr extranew


The respective percentage improvements over flac -8:
1,1 %
1,7 %
2,3 %
2,9 %

Probably a bit less than what one would expect for 16-bit files, which is natural from the hunch that the least-significant bits are more like white noise, which is incompressible regardless of codec and will push results towards equality.


(Test corpus ... WTF did I really intend to write? Anyway, the filesizes are easy to read.)


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
benski
post Jun 25 2012, 17:39
Post #71


Winamp Developer


Group: Developer
Posts: 670
Joined: 17-July 05
From: Brooklyn, NY
Member No.: 23375



QUOTE (eahm @ Jun 25 2012, 12:13) *
QUOTE (benski @ Jun 25 2012, 08:43) *
I suspect that compression of 24-bit PCM as well as higher sample rates could be improved in FLAC without any format-breaking changes. The encoder is non-optimal in these scenarios.

Really? It doesn't even properly handle 24bit? I have few albums in FLAC and 24bit, what do you mean by this?


I mean that the algorithm is tuned for 16bit 44,100Hz input
Go to the top of the page
+Quote Post
IgorC
post Jun 25 2012, 18:32
Post #72





Group: Members
Posts: 1573
Joined: 3-January 05
From: ARG/RUS
Member No.: 18803



QUOTE (eahm @ Jun 25 2012, 13:13) *
Going back to the original question, not looking at the 1% better compression and not talking about TAK in every post, what doesn't True Audio have that other formats have? Again, reading the specs it seems the absolute best, please let me understand why I shouldn't convert and keep everything in True Audio.

Let me ask You probably a stupid question but it's the only way to figure out if we're on the same page here.

Do You know that all lossless formats have exactly the same audible quality (100% bit-to-bit exactly CD quality in case if source was a CD) no matter the specifications and applied algorithms?

This post has been edited by IgorC: Jun 25 2012, 18:38
Go to the top of the page
+Quote Post
db1989
post Jun 25 2012, 18:41
Post #73





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



Yes, quality has nothing to do with it. eahm seems to have simply read the Wikipedia article linked in their first post, seen that TTA has bigger numbers, and concluded that it must be ‘the best’ (whatever that means) despite (1) its being almost unknown to laypeople and developers, and not even very well-known amongst enthusiasts such as HA users; and (2) the fact that numerical parameters mean very little when they’re almost completely nominal and should be quite trivial to increase in the code.

This post has been edited by db1989: Jun 25 2012, 18:45
Go to the top of the page
+Quote Post
eahm
post Jun 25 2012, 18:47
Post #74





Group: Members
Posts: 1084
Joined: 11-February 12
Member No.: 97076



QUOTE (db1989 @ Jun 25 2012, 10:41) *
Yes, quality has nothing to do with it. eahm seems to have simply read the Wikipedia article linked in their first post, seen that TTA has bigger numbers, and concluded that it must be ‘the best’ (whatever that means) despite (1) its being almost unknown to laypeople and developers, and not even very well-known amongst enthusiasts such as HA users; and (2) the fact that numerical parameters mean very little when they’re almost completely nominal and should be quite trivial to increase in the code.

Exactly, asking a simple question. Not "the best" just "the most future proof".

It's funny people attach to codecs like they are the parents, we are talking about transferring the same data with a wider range, like IPv4 vs IPv6. Of course the data isn't lost during the transfer but it's also obvious a codec with a wider range will be more future proof, it's inevitable in 10 years we will have to switch FLAC to something else when people will start wondering why no one use 64bit audio etc. etc. Same story repeating.

This post has been edited by eahm: Jun 25 2012, 18:51


--------------------
/lwAsIimz
Go to the top of the page
+Quote Post
skamp
post Jun 25 2012, 18:50
Post #75





Group: Developer
Posts: 1442
Joined: 4-May 04
From: France
Member No.: 13875



QUOTE (db1989 @ Jun 25 2012, 19:41) *
numerical parameters mean very little when they’re almost completely nominal and should be quite trivial to increase in the code


Given FLAC's streaminfo metadata block, increasing the number of supported channels would require an update to the format, and updated decoders, though. I didn't bother to check further.


--------------------
See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post

5 Pages V  < 1 2 3 4 5 >
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: 18th September 2014 - 10:05