How can I quickly sort lossless ALAC .m4a files from lossy .m4a files?

Apple uses the .m4a container for both lossless ALAC files and lossy music files. I'd like to sort the lossless from the lossy so I can batch convert all the lossless ALAC flies to FLAC so my Oppo BDP-93 can read them. The problem is identifying which .m4a files are which. Is there a way to sort all my .m4a files into lossy and lossless catagories? I simply cannot pick my way through 18,000 files one at a time.

OS X Mountain Lion (10.8.5)

Posted on Oct 5, 2013 4:08 PM

Reply
12 replies

Oct 16, 2013 3:59 PM in response to weitrhino1

I'm surprised that after 78 views over 11 days there hasn't been a single response.



I may have found a solution using Spotlight and Smart Folders.

Instead of starting off creating a new Smart Folder, I just simply used CMD-F and designated my search for the eSATA drive where I keep my music backed up. Then I was able to implement filtering to narrow down my choices and save into a new folder:

Kind / is / Music All +

File Extension / is / m4a

File Size / is greater than / 20 / MB

This is an imperfect solution. There just doesn't seem to be a way of differentiating an m4a file based on the encoding scheme. The Finder would have to actually read into the file to uncover these attributes, i.e. lossless or lossy codec, but cannot because that information is held within the m4a container. My only option was to assume a file larger than 20 MB had to be a lossless ALAC file, and while that's probably true it doesn't mean a file less than 20 MB is certain to be a lossy format. At least I will have resolved the vast majority of the issue. Now I can batch convert these files into FLAC format with the excellent XLD freeware file conversion app. Anything that slipped through the cracks will eventually be found and handled on an individual basis. 154 files were corrected.


Hope that helps the 2 guests who have noted they have the same question, thus far.

Oct 16, 2013 8:15 PM in response to ed2345

I appreciate that suggestion, however it's not real helpful to sort within iTunes because you'll still have to go to each individual file through the finder in order to convert it to FLAC. By employing a smart folder through spotlight, the finder keeps track of just the remaining files yet to be converted. Once changed to FLAC they disappear from the smart folder because they no longer meet the filtering criteria. Your suggestion could be useful for files that may or may not necessarily have been properly sorted by smart filtering. Such outliers were few by comparison after the bulk of ALAC m4a files were identified.


The second reason iTunes would not have been helpful initially is because these were backup files I needed to sort, as explained in the post above earlier today, not files in the iTunes library.

Oct 17, 2013 7:16 AM in response to weitrhino1

weitrhino1 wrote:


I appreciate that suggestion, however it's not real helpful to sort within iTunes because you'll still have to go to each individual file through the finder in order to convert it to FLAC. By employing a smart folder through spotlight, the finder keeps track of just the remaining files yet to be converted. Once changed to FLAC they disappear from the smart folder because they no longer meet the filtering criteria. Your suggestion could be useful for files that may or may not necessarily have been properly sorted by smart filtering. Such outliers were few by comparison after the bulk of ALAC m4a files were identified.


The second reason iTunes would not have been helpful initially is because these were backup files I needed to sort, as explained in the post above earlier today, not files in the iTunes library.


Well, if you ask in an iTunes forum, you get iTunes-based answers. 😉


Anyway, your solution sounds fine. AAC/256 runs about 2 MB per minute of music, and ALAC around 5 MB per minute, so a cutoff of 20 MB is a good place to start, and then you can sort from there.

Oct 17, 2013 12:32 PM in response to ffiti

ffiti


Open your actual iTunes Media folder in Finder. If you haven't moved it, then it should be ~/Music/iTunes, although if it's not there, then check iTunes>Preferences...>Advanced>iTunes Media folder location


From there, you can sort by kind.





No, this doesn't work and puts things back at square one. Sorting files by 'kind' in the Finder will only sort based on the file extension, .m4a. Again, the issue is both ALAC and AAC files use the .m4a container and the Finder cannot differentiate between them.

Jan 18, 2014 3:28 PM in response to weitrhino1

To end this debate on a note. I just found the way myself and thought I'd add it. iTunes is picky with the format so at first I created a smart folder that has Kind set to 'contains' and the word 'Lossless'.


Upon realizing that that actually works I brought up the 'Kind' tab in iTunes and typed it in the way it was shown on that tab, as is below:


I don't have any WAV files in my iTunes but I imagine there could be a mix-up with other lossless formats otherwise, heres my smart folders box in case it helps.


User uploaded file


Hope this helps clear up the problem. Only just figured it out myself haha.


🙂

Feb 1, 2014 10:20 AM in response to Gen Zero

This little freeware app/project:


http://sourceforge.net/projects/mediainfo/



helped me with the same problem. After I found this discussion, I found the app mentioned in another discussion on same basic topic on stackoverflow.com.


http://stackoverflow.com/questions/10934936/determine-whether-an-audio-file-is-e ncoded-in-apple-lossless-alac

There are warnings on some of the one star reviews on soundforge that it installs some kind of crapware. Not on my Mac it didn't. Either the developer took it out or it was just trolls doing their thing.


There are plenty of higher reviews, and I will be adding mine.


This has been a problem for me for years. And the only way I was able to work-around it was to open the files in iTunes, which I don't like doing, because I don't keep any audio files in my iTunes Library, after I back them up on external drives, and then iTunes Match them (either matching or uploading).


But this app solves the problem, at least for me. Just what the (Mac) doctor ordered !😎


P.S. I am running Lion still on 2011 MBA. Not sure if this still works on later OS X versions or earlier ones for that matter. YMMV

Feb 1, 2014 12:03 PM in response to shakurav

I don't keep any audio files in my iTunes Library, after I back them up on external drives, and then iTunes Match them (either matching or uploading).


Shakurav,


I assume you are aware that the matched files are all lossy files. Anything that iTunes Match can match will use a store copy in AAC/256, and any remaining lossless files that need uploading will be transcoded to AAC/256.


With respect to the OP's orginal question of distinguishing lossy from lossless, that is probably not what was intended.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I quickly sort lossless ALAC .m4a files from lossy .m4a files?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.