IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
24-bit ALAC - much larger filesize than FLAC?
steveh7
post Feb 26 2009, 02:55
Post #1





Group: Members
Posts: 1
Joined: 26-February 09
Member No.: 67390



Hi all,

I've just noticed that 24-bit FLAC files converted to ALAC are significantly larger than the original FLAC files, and not much smaller than WAV.
Regular 16-bit files have negligible difference.

Is this normal? Is it the same for you?

Eg:

Original FLAC - 34.1 MB

FLAC to ALAC using XLD - 64.5 MB

FLAC to WAV using XLD - 77.3 MB
WAV to ALAC using iTunes - 64.5 MB

ALAC to FLAC using XLD - 38.9 MB
WAV to FLAC using XLD - 38.9 MB

Cheers
Go to the top of the page
+Quote Post
ameyer17
post Feb 26 2009, 04:32
Post #2





Group: Banned
Posts: 78
Joined: 7-October 04
Member No.: 17551



I'm guessing ALAC is just not really good for encoding 24 bit audio.

This post has been edited by greynol: Apr 2 2009, 21:04
Reason for edit: Removed useless full quote of the previous post.
Go to the top of the page
+Quote Post
Justin Ruggles
post Feb 26 2009, 23:04
Post #3





Group: Developer
Posts: 165
Joined: 3-June 06
From: Raleigh, NC
Member No.: 31393



This might be true, but not necessarily. An ALAC file has a parameter that sets the maximum value for the rice coding parameters. I believe most 16-bit files have this limited to 14, and it could be that Apple's encoder does not increase that for 24-bit. I have not tried this out though. FFmpeg's ALAC encoder does not yet support 24-bit, but I believe the one in dBPoweramp does, and it might do a better job with 24-bit than the Apple encoder.
Reason for edit: Holy quoting spree, batman.
Go to the top of the page
+Quote Post
kornchild2002
post Feb 27 2009, 00:54
Post #4





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



I think that dBpowerAMP's ALAC encoder/decoder still supports only 16/44.1 operation. I have a 24-bit ALAC file (generated with iTunes) and dBpowerAMP still refuses to properly convert it to anything (the resulting file is 30k in size).

I believe that this is normal behavior for ALAC as I conducted a small test using my 24-bit ALAC file. I first converted it to WAV and then back to FLAC. The FLAC file was almost half the size of the ALAC file. I don't know what ALAC is doing here as the song really isn't that complex. It is basically a cover of a rap song (by a non-rap artist) with simple beats. However, I think that a 12.8MB difference is significant when comparing your ALAC and WAV test (my tests yielded slightly better results). 12.8MB represents a ~17% decrease in file size.
Go to the top of the page
+Quote Post
JSW
post Oct 12 2010, 19:48
Post #5





Group: Members
Posts: 55
Joined: 21-November 06
Member No.: 37843



Is there an update on this issue?

I have a CD with a lot of high frequency noise, so I ran an AIFF rip of it through
sox -b 24 sinc -t 200 -15400
This produced 24-bit files with no content above roughly 15600 Hz. Since I use iTunes/iPod Touch, my usual archival format is ALAC. But the ALAC files were much larger than the ALAC from the original 16-bit file: track 1, which is 3:14 in duration (stereo of course) became 26.6 Mb. The relevant version of Quicktime is 7.6.6 (1674) on a MacBook Pro.
I made another copy dithered to 18 bits, by applying
sox vol 0.015625 dither
and then
sox -D vol 64
to the result, so that I have 24-bit files with zeroes in the 6 LSB's.
The ALAC of the 18-bit files were almost exactly the same size (e.g. 26.6 Mb for track 1). A good lossless codec should be able to take advantage of the properties of signals that do not use the full bandwidth and bitdepth of their container formats. When I did FLAC on the same track, the 24-bit version became 9.9 Mb, and the 18-bit version became 14 Mb.

Would future versions of Quicktime or other ALAC coders be able to do a good job on this kind of file? If I'm going to be able to make claims about the audibility of this kind of filtering, I'll want it to be convenient to keep and play multiple copies of my music. I don't think I even have a media player that can handle FLAC files and output 24-bit audio.

This post has been edited by JSW: Oct 12 2010, 19:51
Go to the top of the page
+Quote Post
saratoga
post Oct 12 2010, 20:02
Post #6





Group: Members
Posts: 4853
Joined: 2-September 02
Member No.: 3264



QUOTE (JSW @ Oct 12 2010, 14:48) *
Would future versions of Quicktime or other ALAC coders be able to do a good job on this kind of file?


Probably, but you'd have to ask Apple or ffmpeg.

QUOTE (JSW @ Oct 12 2010, 14:48) *
If I'm going to be able to make claims about the audibility of this kind of filtering, I'll want it to be convenient to keep and play multiple copies of my music. I don't think I even have a media player that can handle FLAC files and output 24-bit audio.


AFAIK your ipod is just truncating to 16 bit (probably without dither) so you might as well just keep the 16 bit version on your player, and the store the 24 bit one as FLAC.
Go to the top of the page
+Quote Post
lvqcl
post Oct 12 2010, 20:12
Post #7





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



http://www.hydrogenaudio.org/forums/index....st&p=675647
Go to the top of the page
+Quote Post
tuffy
post Oct 12 2010, 20:27
Post #8





Group: Members
Posts: 111
Joined: 20-August 07
Member No.: 46367



Given a 24-bit stream, ALAC stores the lower 8 bits completely uncompressed while applying the compression to the high 16 bits. The "wasted bits" bit in the frame header indicates whether that uncompressed block of lower 8 bits is present or not, but it is generally the opposite of FLAC's use of the same term.
Go to the top of the page
+Quote Post
JSW
post Oct 12 2010, 22:30
Post #9





Group: Members
Posts: 55
Joined: 21-November 06
Member No.: 37843



QUOTE (tuffy @ Oct 12 2010, 14:27) *
Given a 24-bit stream, ALAC stores the lower 8 bits completely uncompressed while applying the compression to the high 16 bits. The "wasted bits" bit in the frame header indicates whether that uncompressed block of lower 8 bits is present or not, but it is generally the opposite of FLAC's use of the same term.



I take it this means that it will be impossible for future encoders to make efficient 24-bit ALAC while maintaining compatibility with current decoders?
Go to the top of the page
+Quote Post
JSW
post Oct 12 2010, 23:23
Post #10





Group: Members
Posts: 55
Joined: 21-November 06
Member No.: 37843



QUOTE (saratoga @ Oct 12 2010, 14:02) *
AFAIK your ipod is just truncating to 16 bit (probably without dither) so you might as well just keep the 16 bit version on your player, and the store the 24 bit one as FLAC.


I'm pretty sure that iTunes and Quicktime Player on my computer send 24-bit streams to audio output, and that many other computer media players truncate to 16 bits. The Apple players do not like FLAC. I bought the iPod largely for the apps, and I don't really care whether I can store a lot of music on it. I usually don't bother to make compact versions of my music files for the iPod. I posted here more because I was surprised by the magnitude of the file size differences than because disc space is a pressing matter.

Do the ALAC format and Quicktime library support storing just two extra bits uncompressed at the end of each sample? If so, it might be desirable for XLD to add a feature "truncate to n bits before encoding", so that it could know to call the encoder with the right settings.
Go to the top of the page
+Quote Post
pdq
post Oct 12 2010, 23:37
Post #11





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



The more obvious solution is to dither to 16 bits. The two extra bits should make no audible difference anyway.
Go to the top of the page
+Quote Post
tuffy
post Oct 13 2010, 00:04
Post #12





Group: Members
Posts: 111
Joined: 20-August 07
Member No.: 46367



QUOTE (JSW @ Oct 12 2010, 17:23) *
Do the ALAC format and Quicktime library support storing just two extra bits uncompressed at the end of each sample? If so, it might be desirable for XLD to add a feature "truncate to n bits before encoding", so that it could know to call the encoder with the right settings.

The number of uncompressed low bits is always a multiple of 8. Perhaps Apple's engineers decided to treat that data like noise in the case of 24bps input, but it doesn't leave a lot of flexibility.
Go to the top of the page
+Quote Post
spoon
post Oct 13 2010, 09:29
Post #13


dBpowerAMP developer


Group: Developer (Donating)
Posts: 2741
Joined: 24-March 02
Member No.: 1615



To me it seems a work in progress, ie they (Apple) will fix the 24 bit support better when they actually have a need to.


--------------------
Spoon http://www.dbpoweramp.com
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: 25th July 2014 - 23:03