Stream Your iTunes Library to iPhone Over the Web Mac
MUO
Stream Your iTunes Library to iPhone Over the Web Mac
This is by no means a new tip. Many iPhone owners have been using this little "hack" to stream movies and music from iTunes. However, I thought it would be helpful if I were to repackage the instructions so that they are easier to follow. I've also added a few tips of my own. Recently, I've been looking for a way to stream the movies and music in iTunes library to my iPhone. It can't be that hard, I thought. Turns out, it isn't. A simple hack discovered by (the folks who brought you Awaken) turns your Mac into a server that is easily connectable from your iPhone (or iPod Touch or any other device for that matter). Yes, I realize that there are some applications that are able to stream music and/or video to the iPhone. Simplify Media is a great app for instance, to stream music over the internet but personally, my music library is too large and I find that the Simplify Media server can't take the load. I'm not totally sure if it can stream video too, by the way. is an option if you want to stream video to your iPhone but it's not free. Heck, it isn't even cheap at £20 ($25). Audiolizer is another service that lets you , but it requires you to upload the songs to its server. Allow me to explain what this hack is all about. It enables a function on your Mac to turn it into a personal web server. You can then share anything you want on the local area network (LAN) - movies, music, files. It can also be accessible outside your LAN over the internet (be careful about this). It doesn't have a gorgeous, graphical interface; it merely presents a list of your files. What can this hack do? It can stream your iTunes library to iPhone. It can also stream your Movies in iTunes which are properly encoded (not the .mov reference movies) in h.264. They don't even need to be formatted for the iPhone. It can also allow access to any folder on your Mac, serving you with documents or pictures you left at home. OK, let's get started. I'm writing this tutorial based on Leopard. Navigation in Tiger and previous OSes may be slightly different. First, what we need to do is enable "Web Sharing" or previously known as "Personal Web Sharing". Head over to System Preferences located on your Dock in Leopard. Tiger users can get to System Preferences by clicking on the Apple icon at the top-left corner. Once there, click on 'Sharing'. Check the box next to "Web Sharing" to enable it. Note your IP address shown on the right side. This is your internal IP if you have a router. Depending on whether you are connected via DHCP, your IP may change. If it does change, all you need to do is find out what your new IP is. The server folder is located at /Library/WebServer/Documents/ in your root folder (that's the folder with a hard disk for its icon). In order to share your music, videos and other stuff, you'll need to create symbolic links to them and place them into this folder. Symbolic links differ from aliases created with Finder. Leaving the server folder alone for the time being, open up your Music folder and delve down until you see the iTunes Music folder. Now, you need to create a symbolic link for this folder in order to share it. There are 3 ways of doing this. The easiest way is to download and extract this droplet [Create Symbolic Link]. Drag and drop the iTunes Music folder into the droplet and it will produce a symbolic link for it with a .sym extension back to the same location. Take that link, drop it into the /Library/WebServer/Documents folder and remove the .sym from its name. An alternative for that is to download SymbolicLinker. It adds a contextual menu that can easily create symbolic links by right-clicking on any folder. Mount the SymbolicLink DMG image file and drag the plugin into ~/Library/Contextual Menu Items/ then restart Finder by holding the Option key while right-clicking on the Finder dock icon. Then select 'Relaunch'. After Finder relaunches, right-click on the iTunes Music folder, scroll down to 'More' and select 'Make Symbolic Link'. A new symbolic link appears with a "symlink" added to its name. Drag that link over to /Library/Webserver/Documents/ and remove "symlink" from its name. If you're a DIY-er, the Terminal method is the hardest and most complicated but I'll show you how to do it anyway. Since you're following these instructions instead of the above two, I'll assume that you're not a novice. That said, launch Terminal. Navigate to the server folder by typing: cd /Library/WebServer/Documents Then create a symbolic link to your iTunes Music Folder and name that folder Music ln -s "/Volumes/[Your HD name]/Users/[Your short username]/Music/iTunes/iTunes Music" Music Replace [Your HD name] with the name of your hard disk volume; and [Your short username] with your short username as seen in on the right side of the "Web Sharing" screenshot above, after the internal IP address but without the tilde. Check if the symbolic link has been created. Now that you have the symbolic links, we need to make the iTunes Music folder web-accessible. Using Terminal, type: sudo chmod 755 ~/Music You'll be asked to for your user password. Please note: You need to make the main folder of any sharing folder web-accessible or else, you'll get an error. For example, in this instance, we're sharing the iTunes Music folder within the iTunes folder which is in the Music folder. So, we make the ~/Music folder web-accessible. Now if you want to share a folder called "X" which is located in your Downloads folder, you need to make ~/Downloads/ web-accessible using the {sudo chmod} command. Since you've already made the ~/Downloads folder web-accessible, any other folder within this folder for which you decide to create a symbolic link in the future will be web-accessible automatically. Okay, symbolic links - Check. Web-accessibility - Check. Let's try it out. In your browser, type in http://[Your internal IP address]/iTunes Music/ and you should be presented with a page containing a list of your artists. That was just a taster. Now comes the sweet part - streaming movies to your iPhone! The movies can be stored anywhere as along as they are formatted in h.264. To be safe, I'll just show you how to share your iTunes Movies folder. All videos stored in iTunes can be played on the iPhone or iPod Touch even if they're not formatted for portability. Remember that .mov reference movies cannot be played. If your movies aren't formatted in h.264, iSquint is a great application for conversion. It was developed by TechSpansion (which has shut down) but iSquint is still available for free. Download it here and convert your files into iPod format to add into iTunes. The iTunes movies folder is located within the iTunes Music folder, which means essentially it was already shared. Just scroll down the list of your artist until you see Movies. But to make it easier to call, we shall share the folder as well. Create a symbolic link for ~/Music/iTunes/iTunes Music/Movies and place it in the server folder then rename it to Movies. Test it out. In your browser, type http://[Your IP address]/Movies/ Great! Now whip out your iPhone, connect to your home Wi-Fi network and launch Safari. Enter your internal IP followed by /Movies/ like above. Click on any video, wait for it to buffer and it will start playing! But what if you're not connected to your local area network? You will still be able to access your music and movies from the internet if you allow port 80 to be forwarded to your Mac. There are a few variables here. For one, your internal IP needs to be static for your router to forward port 80 consistently to your Mac. Port forwarding varies depending on your router's make and model, for instructions, . Second, even if your internal IP is static, your external IP may not be. If it isn't, then you'll need to sign up for . If your external IP is static, then great - find out what your IP is by going to whatismyip.com then copy that IP and type it in your browser in this fashion: http://[Your external IP address]/Movies/ You should be presented with the same list of files as when you entered your internal IP. If you received an error then check the variables: IP address, port forwarding, firewall. Allowing access to port 80 on your Mac brings up security issues and unwanted intrusion. Be sure to have your firewall enabled and allow port 80 to come through. Also, be cautious when sharing your external IP address. Like I said before, this is not a new tip. I merely wanted to simplify the process for Switchers and new iPhone/iPod Touch owners to follow. I hope you find this tip useful and you're glad to finally stream videos to your iPhone.