Filed under: iPod Family, iTunes, iPhone
Stream Music from your iPhone to iTunes with Firefly Media Server
Mike Ter Louw has brilliantly managed to port mt-daapd, the Firefly Media Server, to iPhone. Firefly makes use of your iPhone's built in mDNS/Bonjour media service to stream audio to iTunes. Any iTunes. The one running on your home computer. The one running on a friend's computer. Wherever. Stream from your iPhone to a quality audio system. Here's how it works.
Navigate to http://home.mike.tl/iphone/ with Mobile Safari. This adds Mike's repository to Installer.app. Then launch Installer, select Firefly and install it. Wait as the package builds your music database. This can take 5-10 minutes based on the size of your iTunes library.
On your computer--or any computer you're visiting with--set iTunes to share music. Make sure your firewall settings allow communication and enable "Look for shared library" in your iTunes Sharing preferences.
In iTunes, locate your shared library--it will be listed by the name of your iPhone. Select it and log in. Even if you're using 1.1.1, the media password still appears to be "dottie".
Then just select a song and play! This, ahem, rocks. A lot.
Update: TUAW Reader Jonathan adds: "Safari redirects to /beta/. I bypassed that by going into installer.app's sources page and manually adding http://home.mike.tl/iphone. Installer picked it up right away, and it's building my music database now. "


![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 3)
Dan said 3:00PM on 1-29-2008
this is amazing it works really well if you can get it setup
Reply
Zoli said 2:43PM on 10-31-2007
I'm getting: "safari can't download this file."
Does this work for anyone else?
Also, is there a way to turn off the service if you want to turn sharing off?
Reply
ChrisC said 1:40PM on 12-12-2007
dude.. the link doesnt work it cannot find the server!? that sucks. What iphone needs to do is add a feature so you can even stream through blue tooth. it would be nice for those of us with HD audio systems with blue tooth capes.
Rex Pechler said 2:55PM on 10-31-2007
Now if only iTunes would let you put tracks from Shared Libraries into Party Shuffle. Then, this would be awwwwsome at a party. Everyone could be adding tracks from their iPhones. =D
Reply
emcp said 2:55PM on 10-31-2007
Will navigating to and downloading from sites still work if you've fixed the tiff exploit?
Reply
JeffCGD said 9:40PM on 11-05-2007
Does this work for iPod touch too?
Reply
Zoli said 2:58PM on 10-31-2007
Trying on regular safari I can confirm.... link's dead Erica.
Reply
Erica Sadun said 2:59PM on 10-31-2007
Link won't work on regular Safari. Connect on your iPhone or iPod touch, with Installer.app installed.
Reply
ricosuave said 3:03PM on 10-31-2007
How can I do the reverse and stream music to my iPhone? I am using iTunes and Leopard.
Reply
Sander Backus said 3:16PM on 10-31-2007
Link is dead on iPod touch. redirects to /beta en getting a 404 there
Reply
Bob S. said 3:06PM on 10-31-2007
Firefly's a great music server, but running it on an iPhone (or, I assume, iPod Touch) really seems like overkill. Why not just run it on your PC, Mac, or NAS box and serve all of your music instead of just 8 or 16 gigs of it?
Reply
Jon said 3:08PM on 10-31-2007
@ ricosuave
Exactly what I was thinking!
This app is very cool, but I really want one that does the opposite. A native iPhone app that streams all my media FROM my mac. I'd rather not have to use safari and DOT.TUNES or iPhoneRemote.
I wonder if one of the brilliant hackers out there can trick our iPhone's iPod app to stream media?
Reply
Zoli said 3:09PM on 10-31-2007
Yeah Erica, when I go to it on my iphone I get the error,
"Safari can't download this file."
Reply
brian said 3:08PM on 10-31-2007
rico - as of right now, you can't share your iTunes music to an iPhone the same way you can share it to other computers on your network. you can try this:
http://pixelcity.com/iphone-streaming-music/
It's not as good as a native client would be--and believe me, I wish Apple would release one--but it's something. :-)
Reply
Adam said 3:19PM on 10-31-2007
I have Installer.app on my phone and I'm getting the same message. "Safari can't download this file."
Reply
Richard Alexander said 3:28PM on 10-31-2007
people who are getting the "safari cannot download this file" error
Are you tunning the new installer?
if so, go into installer, go to sources (bottom right)
touch "edit" (top right)
touch "add" (top left)
enter the above address, this will add the repository.
then go into all packages and firefly will be there.
Reply
Erica Sadun said 3:16PM on 10-31-2007
Make sure you're not autocorrecting from .tl to .to
Reply
Greg Hartstein said 3:19PM on 10-31-2007
Erica,
I'm glad you got a chance to take a look at this - I agree about the rocking a lot part.
Here's a thread about it on ModMyiPhone
http://modmyifone.com/forums/showthread.php?p=73584#post73584
To Set Server Configuaration (including turn server off).
1) On iPhone go to http:127.0.0.1:3689
2) You will be asked for a username & password. For now it is User: root Pass: dottie
3) A webpage will open with options to turn server off - rescan...etc.
If you choose to turn the server off, the site becomes unavailable. (iTunes seems to hold onto connection as well - quit iTunes to be totally off). Media server is turned back on automatically when iPhone is restarted.
4) There are links to Configuration pages where you can change Server admin passwords and media access passwords (won't change your iPhone just the media server) as well as many other things I have yet to mess with.
The problem with using this interface is that while you can turn your server off, it doesn't turn back on unless you restart the iPhone. In addition, I didn't really like the fact that the server was on by default as a Launch Daemon.
Sooooo.....I made a couple of small changes to Mike's set-up.
Here's what I did:
I made a folder in /Library called MediaServer and moved the file:
org.fireflymediaserver.mt-daapd.plist
from /Library/LaunchDaemons to /Library/MediaServer
(upon iPhone restart - sharing will no longer be enabled)
We now need to create a program that will start & stop the Media Server.
Luckily for us - you've already done this with your doShell utility:
http://ericasadun.com/ftp/DevTools/doSHELL/
Download this program (along with Erica's Utilities - here or through Installer)
Specifically the script needs "doAlert"
Additionally you'll need to install "pkill" into your /bin folder as well to be able to kill processes by name. It's available at:
http://idisk.mac.com/hartsteins-Public
(be sure to set permissions on pkill)
Before copying doShell into iPhone Application folder, open doShell.app and change contents of file called doit.sh to:
#!/bin/sh
if [ -e /tmp/MediaServerOn ]
then
doAlert "Media Server is Shutting Down"
launchctl unload /Library/MediaServer/org.fireflymediaserver.mt-daapd.plist
rm /tmp/MediaServerOn
pkill doshell
else
doAlert "Media Server is Starting Up"
launchctl load /Library/MediaServer/org.fireflymediaserver.mt-daapd.plist
> /tmp/MediaServerOn
pkill doshell
fi
-----------
The script creates an empty file called MediaServerOn in /tmp as a flag to let the program know if it's serving or not.
Copy doShell.app to applications folder on iPhone and Viola! you can now stop & start the iPhone music sharing.
I'm SURE there are more elegant ways of doing this - input please!
Rock on
Reply
Shawn said 10:50PM on 12-11-2007
I just use NetServices (available through the installer), it seems to work just fine.
matt said 3:18PM on 10-31-2007
I was able to add the repository, but when I try to install the Server itself in Installer.app I get a "Error: Main Script Execution Failed!" message. I'm on a jailbroken (obviously) 1.1.1.
Reply