IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
apple lossless to flac on a mac, apple lossless to flac on a mac
ideasculptor
post Jan 18 2006, 01:38
Post #1





Group: Members
Posts: 2
Joined: 18-January 06
Member No.: 27174



After much searching, I finally determined that there is just no good way to go from apple lossless to FLAC on OS X. However, I just bought an Infrant NAS, which cannot serve apple lossless files to a squeezebox, but can serve FLAC, so I need to convert 1300 cd's from lossless to flac. Even worse, I only have enough storage for one library, so I have to do it in place. So I wrote a tool to do so, preserving tags, etc.

It is a simple python script which parses through the 'iTunes Music Library.xml' file, looking for lossless files, and converting any it finds in place (or not. It's an option). It uses ffmpeg to decode the lossless file to wav (although if anyone knows where to find documentation on using quicktime to do that, I'd love to provide the option of using the only officially sanctioned decoder), and it encodes to flac via the command line flac app. You'll have to brave the source code in order to modify the parameters that are handed to ffmpeg and flac, although it is well documented and should be easy to figure out, even for someone who doesn't know how to program.

Future changes will be to copy any image files from the source directory to the destination, if they are not the same. That will preserve album art that isn't embedded in files.

The code does not use any tags embedded in the lossless files themselves. It grabs them from the XML description of the track, and then inserts them in the flac file. All file names and directory structures are preserved, except for extension, of course. IT Does write the intermediate form (.wav) to disk, so you must have room to store a single wav file (equal to the length of the longest track you'll be transcoding). Currently, it doesn't delete the source lossless file, although it should, at least optionally.

It requires python, ffmpeg, and flac, but should run on any platform for which those tools exist.

It is licensed unde the GPL, which means you can use it how you please, but can't distribute it without keeping it under the GPL and including the source code.

It will be up on sourceforge as soon as those guys fix their interface so that you can create new projects. It is currently broken. That's why I am posting it here. Please, I spent days searching, so hopefully someone else will find this useful, eventually.

I'd love to hear about it if you wind up using it.

Hmmm...It appears that you cannot provide attachments around here, so here's a link:

alac2flac
Go to the top of the page
 
+Quote Post
bgavinski
post Aug 7 2006, 06:10
Post #2





Group: Members
Posts: 1
Joined: 7-August 06
Member No.: 33745



Looks like a useful program. I would very much like to use it but I am struggling with the Python basics. I have managed to get the program to run OK. It parses the Library.xml file and creates all the appropraite folders but it doesn't convert anything. I assume I don't have ffmpeg and/or flac in the right place or right format. I have been struggling to find an executable of ffmpeg. Any and all help would be greatly appreciated.

I am a better listener than programmer.

Thanks Brian
Go to the top of the page
 
+Quote Post
chelgrian
post Aug 8 2006, 22:52
Post #3





Group: Members
Posts: 305
Joined: 27-April 03
Member No.: 6228



QUOTE (ideasculptor @ Jan 18 2006, 01:38) *
After much searching, I finally determined that there is just no good way to go from apple lossless to FLAC on OS X. However, I just bought an Infrant NAS, which cannot serve apple lossless files to a squeezebox, but can serve FLAC, so I need to convert 1300 cd's from lossless to flac. Even worse, I only have enough storage for one library, so I have to do it in place. So I wrote a tool to do so, preserving tags, etc.



What you mean other than using Max (www.sbooth.org)?
Go to the top of the page
 
+Quote Post
kritip
post Aug 8 2006, 23:56
Post #4





Group: Members
Posts: 486
Joined: 15-January 02
From: Warwickshire -- England
Member No.: 1036



I doubt that max had this feature in January!? Old thread alert. Shame I missed it, seemed like a good project/development/post.

Kristian
Go to the top of the page
 
+Quote Post
Justin Ruggles
post Aug 9 2006, 06:57
Post #5





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



If you compile FFmpeg from current SVN, you can do both in 1 step since FFmpeg now has FLAC encoding. It is not quite as full-featured as the flac reference encoder, but it does the job. smile.gif

The simplest commandline for this would be:
ffmpeg -i input.m4a output.flac

-Justin
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: 21st November 2009 - 12:10