Head-Fi.org › Forums › Equipment Forums › Computer Audio › ALAC to FLAC conversion no loss of quality?
New Posts  All Forums:Forum Nav:

ALAC to FLAC conversion no loss of quality?

post #1 of 13
Thread Starter 

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.

post #2 of 13
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.
Edited by Jaywalk3r - 2/13/12 at 4:09pm
post #3 of 13
Thread Starter 
Quote:
Originally Posted by Jaywalk3r View Post

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.

post #4 of 13
Quote:
Originally Posted by ABRockWell View Post

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".
Edited by Jaywalk3r - 2/13/12 at 7:25pm
post #5 of 13
Thread Starter 
Quote:
Originally Posted by Jaywalk3r View Post


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".

 

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?
 

 

post #6 of 13
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.
Edited by Jaywalk3r - 2/14/12 at 11:29am
post #7 of 13
Thread Starter 

Yes I used XLD for the ripping and conversion as well.

post #8 of 13
Thread Starter 

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.

post #9 of 13
Quote:
Originally Posted by ABRockWell View Post

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.
post #10 of 13
Thread Starter 
Quote:
Originally Posted by Jaywalk3r View Post


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.

 

post #11 of 13
Thread Starter 

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?

post #12 of 13
Quote:
Originally Posted by ABRockWell View Post

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.
Edited by Jaywalk3r - 2/14/12 at 3:01pm
post #13 of 13
Quote:
Originally Posted by ABRockWell View Post

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.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Computer Audio
Head-Fi.org › Forums › Equipment Forums › Computer Audio › ALAC to FLAC conversion no loss of quality?