ALAC to FLAC conversion no loss of quality?
Feb 13, 2012 at 6:56 PM Thread Starter Post #1 of 22

ABRockWell

Head-Fier
Joined
Jan 18, 2012
Posts
51
Likes
13
Basically my question is whether the conversion from ALAC to FLAC or vice versa remains lossless in quality.
 
I ask because today I converted a few files using XLD and I accidentally left the output format as both FLAC and ALAC and the ALAC output file was actually a different size of the originally ALAC input file.
 
I'm in the process of converting my entire iTunes library which is in ALAC format to FLAC for use with my Hifiman. My CDs were originally ripped in iTunes using the ALAC option and error correction. It would save me a whole bunch of time if I can just use something like XLD to convert my library to FLAC.
 
I hope someone can clarify this process for me.
 
Feb 13, 2012 at 6:59 PM Post #2 of 22
Both FLAC and ALAC are lossless codecs. Conversion between them is also lossless.

To verify, I converted file.wav to file.m4a (ALAC). I then converted file.m4a to file.flac. I also converted file.wav (the original file) to file.flac. I then obtained the md5 checksums of each of the two flac files. They matched exactly. I used XLD for all of the conversions.

Note that I've previously performed similar tests to verify that the conversions from WAV to ALAC and from WAV to FLAC are both lossless, so I didn't verify that again here.
 
Feb 13, 2012 at 8:05 PM Post #3 of 22


Quote:
Both FLAC and ALAC are lossless codecs. Conversion between them is also lossless.
To verify, I converted file.wav to file.m4a (ALAC). I then converted file.m4a to file.flac. I also converted file.wav (the original file) to file.flac. I then obtained the md5 checksums of each of the two flac files. They matched exactly. I used XLD for all of the conversions.
Note that I've previously performed similar tests to verify that the conversions from WAV to ALAC and from WAV to FLAC are both lossless, so I didn't verify that again here.



Thanks for info Jaywalk3r, is there a way I can replicate this on my end? What software package do you use to obtain the md5 checksums you speak of? Thanks again.
 
Feb 13, 2012 at 10:15 PM Post #4 of 22
What software package do you use to obtain the md5 checksums you speak of? Thanks again.


I use Terminal, the command line interface of Mac OS X.

The command is:
Code:
md5 /path/to/file.name

The fastest way to enter the file's path is to simply drag and drop the file's icon onto the Terminal window when you're ready to start typing it. Don't forget the space after "md5".
 
Feb 14, 2012 at 2:20 PM Post #5 of 22


Quote:
I use Terminal, the command line interface of Mac OS X.
The command is: Code:
Code:
 md5 /path/to/file.name
The fastest way to enter the file's path is to simply drag and drop the file's icon onto the Terminal window when you're ready to start typing it. Don't forget the space after "md5".

 
Ok so I tried it. First I tried with a FLAC from the original CD and then I tried it with a FLAC converted from an ALAC file from the original CD and the checksums do not match. I should note that I made sure it was the same track for both. Am I doing something wrong?
 
 
 
Feb 14, 2012 at 2:22 PM Post #6 of 22
Did you use the same application for all of the conversions, starting with CD import? If the settings for the two FLAC conversions were not identical, the md5 checksums would not be expected to match.

Also, the reason I started with a WAV file instead of a CD was to eliminate the possibility of an import error (which would be irrelevant to the topic at hand) affecting the results.
 
Feb 14, 2012 at 2:29 PM Post #8 of 22
Ok so I downloaded a software package compatible with OS X called xACT and I tried retrieving checksums in FFP format for both of the same files and they are the same, but the MD5 is not.
 
Feb 14, 2012 at 2:44 PM Post #9 of 22
Ok so I downloaded a software package compatible with OS X called xACT and I tried retrieving checksums in FFP format for both of the same files and they are the same, but the MD5 is not.


The MD5 checksum depends on the file. If they are not exactly alike, then they will not match. Thus, if the FLAC settings are not identical, then the MD5 checksum will not match.

The FFP checksum depends on the uncompressed audio instead of the actual file. Consequently, converting the same file to FLAC twice, with different FLAC settings each time, will still result in the two FLAC files having the same FFP checksum.

If you want to reassure yourself, convert each of your two FLAC files to WAV (or AIFF), then check the MD5 checksums.
 
Feb 14, 2012 at 3:24 PM Post #10 of 22


Quote:
The MD5 checksum depends on the file. If they are not exactly alike, then they will not match. Thus, if the FLAC settings are not identical, then the MD5 checksum will not match.
The FFP checksum depends on the uncompressed audio instead of the actual file. Consequently, converting the same file to FLAC twice, with different FLAC settings each time, will still result in the two FLAC files having the same FFP checksum.
If you want to reassure yourself, convert each of your two FLAC files to WAV (or AIFF), then check the MD5 checksums.


So even something as minor as the format of the title name can give it a different md5 checksum? Because that is the only thing I can think of that is different I usually format them by track #00 - track name and one of them is just #0 track name.
 
I'll try converting both of those FLACs to WAV and report back. Thanks again.
 
 
Feb 14, 2012 at 5:16 PM Post #11 of 22
So the one track in question was ripped from the original CD, using both FLAC and ALAC outputs at the same time using XLD.
 
So I then converted the FLAC file to WAV using XLD retrieved its md5 checksum, I then converted the ALAC to FLAC, then FLAC to WAV and checked its md5 checksum and both are the same.
 
Yet when I compare the first FLAC without converting to WAV, to the ALAC converted to FLAC using XLD, their md5 checksums don't match. What can be going on?
 
Feb 14, 2012 at 5:52 PM Post #12 of 22
So even something as minor as the format of the title name can give it a different md5 checksum?


Changing a file name shouldn't change the MD5 checksum. However, changing the song name in the metadata changes the file, so it will change the MD5 checksum (though it shouldn't change the FFP checksum).

For the information you are after, i.e., is the conversion from ALAC to FLAC really lossless, identical FFP checksums of your two FLAC files should be sufficient to allay your concerns. If the MD5 checksums are identical, that implies that the FFP checksums will also match*.

*Technically, two different files could have the same MD5 checksums which is a security vulnerability of the MD5 algorithm. However, the chances of that happening by chance are so remote as to be effectively zero.
 
Feb 14, 2012 at 6:00 PM Post #13 of 22
So the one track in question was ripped from the original CD, using both FLAC and ALAC outputs at the same time using XLD.

So I then converted the FLAC file to WAV using XLD retrieved its md5 checksum, I then converted the ALAC to FLAC, then FLAC to WAV and checked its md5 checksum and both are the same.

Yet when I compare the first FLAC without converting to WAV, to the ALAC converted to FLAC using XLD, their md5 checksums don't match. What can be going on?


The first thing I would check is how XLD handles the metadata when ripping a CD directly to FLAC versus ripping directly to ALAC versus converting from ALAC to FLAC.
 
May 12, 2019 at 12:44 AM Post #14 of 22
Basically my question is whether the conversion from ALAC to FLAC or vice versa remains lossless in quality.

I ask because today I converted a few files using XLD and I accidentally left the output format as both FLAC and ALAC and the ALAC output file was actually a different size of the originally ALAC input file.

I'm in the process of converting my entire iTunes library which is in ALAC format to FLAC for use with my Hifiman. My CDs were originally ripped in iTunes using the ALAC option and error correction. It would save me a whole bunch of time if I can just use something like XLD to convert my library to FLAC.

I hope someone can clarify this process for me.
Having the same "problem" too. Not sure if quality got degraded converting from FLAC to ALAC using XLD. My settings say 'same as original' but the size of the file is much less than the original FLAC. Have you figured it out yet?
 
May 12, 2019 at 5:18 AM Post #15 of 22
Having the same "problem" too. Not sure if quality got degraded converting from FLAC to ALAC using XLD. My settings say 'same as original' but the size of the file is much less than the original FLAC. Have you figured it out yet?
Some encoders are more efficient than others also one can sacrifice encoding speed for size.
 

Users who are viewing this thread

Back
Top