Contributed by mbalmer on from the so-sue-me dept.
We were sitting on IRC, chatting a bit about the Apple AirPort Express device, which allows to stream audio from iTunes over wireless to your stereo. Quickly Marc Balmer mentioned that a OpenSource software called JustePorte exists, unfortunately written in C#. Jon Lech Johansen reverse engineered the inner workings of the AirTunes protocol, especially finding out the "secret" RSA public key which is, aehm was, used to lock buyers to Apple software. At the end of 2004 he wrote JustePorte to stream audio to the AirPort. After looking at that code and googling a bit arround to check how the AirPort audio streaming works, I thought it would be a nice thing to hack a free C program which we can use on our OpenBSD boxes. So, I opened a CVS repository and started hacking, and Marc Balmer joined to help out hacking. On Sunday, January 29th we had the idea, on Monday I bought an AirPort device and today the first shoot of rtunes was released.
Here's a quick explanation how the streaming works:
We have the RSA public key which Jon reverse engineered out of iTunes. On the AirPort device the RSA private key is stored. The audio stream is encoded by AES encryption, and the streaming protocol is RTSP. We choose a random AES session key, encrypt it with the RSA public key and send it to the AirPort in a RTSP ANNOUNCE body. If the RSA public key can be opened by the RSA privat key the AirPort got our AES session key, and we can start streaming the audio files AES encrypted. The streamed codec must be Apple Lossless.
Actually we have no codec converter in rtunes, what means that we just can stream Lossless files for now. The goal for further versions is to get in a mp3 to Lossless converter, so we can also stream our mp3 files. Of course other codec converters would be also nice.
The problem is, that Apple never documented the ALAC codec... We have no idea why, only wild guesses (vendor lock-in comes to my mind...).
Any ideas, patches, and volunteers, especially on the codec converting stuff, are welcome.
Tarball: rtunes-0.1.tar.gz, OpenBSD Port: rtunes-port.tar.gz
Greets,
Marcus
(Comments are closed)
By Pete (80.203.236.21) on
http://craz.net/programs/itunes/files/alac_decoder-0.1.0.tar.gz
/Pete
By Anonymous Coward (142.166.105.108) on
Comments
By Anonymous Coward (213.189.137.178) on
Comments
By Sean Brown (68.147.201.202) on
Again, if Apple is not making this key public voluntarily, is it not possible that there are legal problems to using this software?
Comments
By Anonymous Coward (70.27.15.123) on
Comments
By Anonymous Coward (205.240.34.148) on
Comments
By Anonymous Coward (213.189.137.178) on
By Ralf (130.83.244.129) ralf@fimaluka.org on Ralf-Philipp Weinmann
Comments
By Marcus Glocker (81.221.21.253) marcus@nazgul.ch on http://www.nazgul.ch
I don't know if you ruined somebody's day, mine not in any case ;) I think it is worth to rewrite a software from scratch if it has the BSD license lable on it afterwards.
In the meantime we figured out the ALAC encoding. It seems not be that hard, so playing MP3 and other codecs will come probably in the next version. There are many players out there which decode MP3, AAC, OGG, etc. to RAW PCM audio and sending it to STDOUT so it can just be piped to rtunes and be encoded to ALAC there ...
Regards,
Marcus
By Anonymous Coward (67.64.89.177) on
By Ben (209.98.211.114) mouring@nospam.eviladmin.org on http://eviladmin.org
Comments
By Ben (209.98.211.114) mouring@nospam.eviladmin.org on
- Ben
By marco (140.99.30.238) on
nothing pilsner urquell won't help
By Ben Goren (65.39.81.114) ben@trumpetpower.com on http://www.trumpetpower.com/
Not that I'm in any way capable of contributing, but....
Cheers,
b&
By Marcus Glocker (81.221.21.251) marcus@nazgul.ch on http://www.nazgul.ch
Like promissed, we just released rtunes 0.2 some minutes ago, which is now able to encode RAW PCM audio data to Lossless, which means you can use an audio player to encode codecs to RAW PCM audio data and pipe it to rtunes stdin. I personally use 'madplay' for this, which is in the OpenBSD ports tree. Example:
madplay -o raw:- benson.mp3 | rtunes -
We choosed that method instead the attempt of including all codecs into rtunes itself. It felt to much like reinventing the wheel, for now :)
Also a bug where solved which made the airport hang after playing long songs.
As always; if you find any bugs, improvements, we appreciate patches.
rtunes-0.2.tar.gz, rtunes-port.tar.gz
Enjoy.
Regards,
Marcus