Skip to main content

Topic: Lossless iTunes for Linux (Read 6813 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • agillis
  • [*]
Lossless iTunes for Linux
I am writing a script to convert FLAC files to iTunes. I need a way to encode files on Linux that work with iTunes. I haven't been able to get this to work yet. The format I use must be

1. lossless (I'd love to use Apple Lossless but theirs no encoder for Linux)
2. Have ID3 tags so the track info shows up in iTunes when you import the file (WAV is out)
3. I must be able to encode these files under Linux (no I don't want  to use Wine or any way to run windows binaries under Linux)
4. Optionaly it would be nice is these files were the same size as my FLAC files (about 30% small then WAV)

How about AIFF? I have been able get the FLACs to AIFF but I can't get the ID3 tags to convert over.

I'm really stuck on this one. There has to be a format that works.

  • qristus
  • [*][*][*]
  • Members (Donating)
Lossless iTunes for Linux
Reply #1
Doesn't ffmpeg have ALAC support? http://ffmpeg.org/

  • agillis
  • [*]
Lossless iTunes for Linux
Reply #2
OK, thanks that's a good start. I didn't know ffmpeg did ALAC. I tried this

ffmpeg -i test.flac  -acodec alac test.m4a

and it worked great. BUT there are no tags. iTunes shows it as an un-taggeed file. How can I move the ID3 tags over?



  • jcoalson
  • [*][*][*][*][*]
  • Developer
Lossless iTunes for Linux
Reply #3
have you tried fluke?  works for me, tags and all, no conversion needed.

  • agillis
  • [*]
Lossless iTunes for Linux
Reply #4
have you tried fluke?  works for me, tags and all, no conversion needed.


Thanks for the help but don't forget my requirement #3 This all need to work on linux

3. I must be able to encode these files under Linux (no I don't want to use Wine or any way to run windows binaries under Linux)

  • jcoalson
  • [*][*][*][*][*]
  • Developer
Lossless iTunes for Linux
Reply #5
sure, encode and tag the flacs on linux, import them directly into itunes via fluke.  or maybe I'm just not understanding what you want to do.

edit: just to be crystal clear: fluke lets you import flac files into itunes.  they are not converted to another format, but they play back within itunes and itunes can see the tags.
  • Last Edit: 12 November, 2009, 01:38:08 AM by jcoalson

  • agillis
  • [*]
Lossless iTunes for Linux
Reply #6
sure, encode and tag the flacs on linux, import them directly into itunes via fluke.  or maybe I'm just not understanding what you want to do.

edit: just to be crystal clear: fluke lets you import flac files into itunes.  they are not converted to another format, but they play back within itunes and itunes can see the tags.


I want to be able to rip CDs to a server then have users be able to import the files into iTunes. This solution must work on both Windows and MAC (fluke just works on MAC) I don't want the users to have to load any plugins or software on their PCs. This needs to be really easy. I already have this working with a script called FLAC mirror. It will mirror FLACs as mp3s. This works really well for importing into iTunes accept for the quality loss.

So the question is there any way to convert FLACs to an iTunes compatible file (lossless) with all the ID3 tags intact and not having to use any plugins or extra software on the iTunes end.

  • jcoalson
  • [*][*][*][*][*]
  • Developer
Lossless iTunes for Linux
Reply #7
well then you're kind of stuck with whatever apple gives you:

- the only lossless formats itunes supports natively are wav, aiff, and alac
- alac is proprietary and I would not trust the reverse engineered encoders to be lossless or compliant with a secret spec
- I don't know if itunes supports tags on wav but might for aiff

so if you can figure out how to convert flac to aiff on linux and keep all the tags, that's probably as close as you're going to get.

be sure to vent some frustration on apple for not providing flac support.

edit: the commandline flac decoder will convert flac->aiff but not the tags
  • Last Edit: 12 November, 2009, 04:15:35 PM by jcoalson

  • jcoalson
  • [*][*][*][*][*]
  • Developer
Lossless iTunes for Linux
Reply #8
one more thing, it sounds like you are getting into distribution... note that pretty much everyone who is selling/distributing lossless is using flac and they usually have a faq somewhere that walks users through getting itunes and wmp to work.  this has been going on for years so users must be getting it.  at that point you also have a chance to move some of them to better software; there are lost of programs on mac and windows that support flac natively and do everything itunes does including ipod sync.

you can peruse some of the online stores for their verbiage about getting itunes and wmp to work.

  • agillis
  • [*]
Lossless iTunes for Linux
Reply #9
one more thing, it sounds like you are getting into distribution... note that pretty much everyone who is selling/distributing lossless is using flac and they usually have a faq somewhere that walks users through getting itunes and wmp to work.  this has been going on for years so users must be getting it.  at that point you also have a chance to move some of them to better software; there are lost of programs on mac and windows that support flac natively and do everything itunes does including ipod sync.

you can peruse some of the online stores for their verbiage about getting itunes and wmp to work.

I working on the VortexBox Linux distro. We are trying to make it rip CDs to files that work with all players. I have a script that works now using ffmpg. I just need to validate it. I can rip a track to wav using cdparanoia then convert it to WAV -> FLAC -> Apple lossless -> FLAC -> WAV and it still has the same md5sum. So I think I'm getting someplace.

Here's another question. I am trying to rip a CD track with different software and get the same result. For validation. If I rip a track on windows using dbpoweramp to wav and then the same track using iTunes to wav the md5sum is different. I wonder why? this seems like a different thread.
  • Last Edit: 13 November, 2009, 11:05:13 AM by greynol

  • jcoalson
  • [*][*][*][*][*]
  • Developer
Lossless iTunes for Linux
Reply #10
I can rip a track to wav using cdparanoia then convert it to WAV -> FLAC -> Apple lossless -> FLAC -> WAV and it still has the same md5sum.

the ffmpeg alac encoding<->decoding should match, the question is whether itunes can always decode it.  alac is proprietary, ffmpeg's reverse-engineered encoder may not be compliant, it may not always decode in itunes, apple can change the codec at any time and things break with a new version of itunes, etc.  that's the risk you take.

  • agillis
  • [*]
Lossless iTunes for Linux
Reply #11
the ffmpeg alac encoding<->decoding should match, the question is whether itunes can always decode it.  alac is proprietary, ffmpeg's reverse-engineered encoder may not be compliant, it may not always decode in itunes, apple can change the codec at any time and things break with a new version of itunes, etc.  that's the risk you take.


I will always have the FLAC files as the archive and for playing on everything but iTunes. So I can always re-encode the ALAC files if the format changes. Seems like the only solution that's simple for the end user.