IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
LossyFLAC outputs larger file then plain FLAC?
romor
post Sep 30 2010, 05:26
Post #1





Group: Members
Posts: 680
Joined: 16-January 09
Member No.: 65630



I converted 2min sample to be sent over internet:

size: 6.412.156 B [TAK -p2]
size: 6.802.070 B [FLAC -8]
size: 7.083.526 B [lossyFLAC -q5 | FLAC -8]
size: 5.838.614 B [lossyFLAC -q2 | FLAC -8]

I didn't know that lossyFLAC with any switch can result in larger file then plain FLAC. Why can that be or is it OK?


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
Nick.C
post Sep 30 2010, 06:18
Post #2


lossyWAV Developer


Group: Developer
Posts: 1801
Joined: 11-April 07
From: Wherever here is
Member No.: 42400



It could be that the original material compresses particularly well in FLAC. Compression of lossyWAV processed audio results in a slightly higher overhead due to the smaller block size used (512 rarher than 4096 samples). This phenomenon has been observed before where some files get bigger.


--------------------
lossyWAV -q X -a 4 --feedback 4| FLAC -8 ~= 320kbps
Go to the top of the page
+Quote Post
romor
post Sep 30 2010, 07:11
Post #3





Group: Members
Posts: 680
Joined: 16-January 09
Member No.: 65630



Yes, origanal was well compressed (472 Kb/s)
So, is this like general case for lossyFLAC (lossyWAV) to behave like this if FLAC compressed the material at < 500 Kb/s (for -q5), or this are some exceptions caused by known content of source material?

This post has been edited by romor: Sep 30 2010, 07:31


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
Northpack
post Sep 30 2010, 07:32
Post #4





Group: Members
Posts: 455
Joined: 16-December 01
Member No.: 664



I wonder if it would be possible to implement a special LossyWAV switch for FLAC? It would tell FLAC to encode each 4048 samples once as a whole block and once divided into 4 blocks of 512 samples and choose whatever compresses better. Do the FLAC specifications allow for such a variable block size?
Go to the top of the page
+Quote Post
halb27
post Sep 30 2010, 09:07
Post #5





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



QUOTE (romor @ Sep 30 2010, 08:11) *
Yes, origanal was well compressed (472 Kb/s)
So, is this like general case for lossyFLAC (lossyWAV) to behave like this if FLAC compressed the material at < 500 Kb/s (for -q5), or this are some exceptions caused by known content of source material?

From my experience in case of a original FLAC compression of 472 kbps chance to get a smaller file size when using lossyWAV -q5 and below is pretty high though it won't be much what you gain. But the better FLAC compression is on its own, the higher the chance that lossyFLAC makes it worse. With relative quiet music originating from one or few instruments lossyWAV is more of a disadvantage than an advantage.

From overall view however it's extremely rare that lossyWAV increases file size, that's why I personally don't care about it.

This post has been edited by halb27: Sep 30 2010, 09:09


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
romor
post Sep 30 2010, 09:55
Post #6





Group: Members
Posts: 680
Joined: 16-January 09
Member No.: 65630



QUOTE (halb27 @ Sep 30 2010, 10:07) *
But the better FLAC compression is on its own, the higher the chance that lossyFLAC makes it worse. With relative quiet music originating from one or few instruments lossyWAV is more of a disadvantage than an advantage.

So one more consideration in using lossyWAV would be content of source material (or looking at FLAC bitrate compared to lossyWAV profile chosen)

This post has been edited by romor: Sep 30 2010, 09:56


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
2Bdecided
post Sep 30 2010, 10:10
Post #7


ReplayGain developer


Group: Developer
Posts: 5171
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (Northpack @ Sep 30 2010, 07:32) *
I wonder if it would be possible to implement a special LossyWAV switch for FLAC? It would tell FLAC to encode each 4048 samples once as a whole block and once divided into 4 blocks of 512 samples and choose whatever compresses better. Do the FLAC specifications allow for such a variable block size?
I think we discussed this a year or more back. The FLAC spec fully supports variable block lengths within a single file.

An optimised FLAC encoder (never mind lossyWAV or anything else) would probably make use of this feature. However, no current FLAC encoders do this, so there are no variable block length files around. Which raises the possibility that at least some FLAC decoders might not be built to expect them. Who knows?

You could build a special FLAC encoder to independently adapt the blocksize, or integrate lossyWAV into FLAC and set the blocksize dynamically, or just create two FLACs from each lossyWAV file (i.e. a 512 and a 4048 version) and chop them together using an external utility, keeping whichever version was smaller for each 4048 samples.


Apart from the change in blocksize, it's really quite rare for lossyWAV to increase the encoded filesize. Has anyone actually seen it happen when the FLAC settings (including blocksize) are identical for lossless vs lossyWAV encodings? I'm guessing it could happen, but I'm not sure what kind of signal(s) would trigger this behaviour. If people were paranoid about this, you could write another external script to check it block-by-block by comparing the two versions, and keeping the smaller block - but as I say, I'm not sure when this happens, if at all, and it's a cumbersome sledgehammer-to-crack-a-nut kind of solution.

btw, it's not too unusual for lossyWAV to do exactly nothing. Which is a good thing.

Cheers,
David.

This post has been edited by 2Bdecided: Sep 30 2010, 10:17
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: 21st October 2014 - 03:12