LossyFLAC outputs larger file then plain FLAC? |
![]() ![]() |
LossyFLAC outputs larger file then plain FLAC? |
Sep 30 2010, 05:26
Post
#1
|
|
|
Group: Members Posts: 609 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 (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Sep 30 2010, 06:18
Post
#2
|
|
![]() lossyWAV Developer Group: Developer Posts: 1731 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 | FLAC -8 ~= 308kbps
SGS III (Rooted) + 64GB |
|
|
|
Sep 30 2010, 07:11
Post
#3
|
|
|
Group: Members Posts: 609 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 (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
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?
|
|
|
|
Sep 30 2010, 09:07
Post
#5
|
|
|
Group: Members Posts: 2297 Joined: 9-October 05 From: Dormagen, Germany Member No.: 25015 |
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 -------------------- lame3100k -V0 --cvbr 9
|
|
|
|
Sep 30 2010, 09:55
Post
#6
|
|
|
Group: Members Posts: 609 Joined: 16-January 09 Member No.: 65630 |
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 (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Sep 30 2010, 10:10
Post
#7
|
|
![]() ReplayGain developer Group: Developer Posts: 4615 Joined: 5-November 01 From: Yorkshire, UK Member No.: 409 |
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 |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th June 2013 - 04:33 |