For years I have been trying to find a way to easily and elegantly stream video to multiple small devices in our home. We only have one TV, and not everyone wants to watch the same thing at the same time. This really isn’t the worst problem in the world, obviously, but something I have tried to solve using all manner of different software and hardware combinations. A few weeks ago I discovered an iPhone application that required a server application running on either WIndows or Mac OS X. I tried to install the Windows version on my Ubuntu box running under Wine, but the application would crash as soon as the iPhone app tried to read a file from the hard drive. As they say, Wine Is Not an Emulator, and in this capacity it wasn’t going to cut it. I also checked the forums for the iPhone app developers who provide the PC app, and they had no intention of making a Linux version available anytime soon. So, I did what any self respecting geek would do presented with a solution which could potentially work, made it more complicated.
I first went through the process of building a new virtual machine in VirtualBox to host the Windows XP machine. That was quick and easy, and I happened to have an old XP disc lying around which isn’t in use on any computer anymore, since I haven’t used Windows at home since about 2004. The most challenging part was getting the Windows XP Guest OS to join the same network as the rest of the machines on my internal LAN, because virtual machines create a software interface and the actual packets are actually coming in through the same physical NIC card on the Linux machine. Fortunately, not too much googling later provided me with exactly the solution I was looking for. After installing these two utilities and running the script, provided at this blog, I was able to make the WIndows XP Guest OS join the 192.168.1.0 network! Perfect.
Now, all I had to do was install Bonjour from Apple, the Air Video Server application provided at inmethod.com and start it up.
I had to share the local Linux directory that stores all of our media, and set that up through VirtualBox, but that was relatively painless, requiring only that I get the VirtualBoxGuestAdditions.iso and use that on the Windows XP Guest OS so that it would recognize the shared folders and I could mount them permanently.
Once it was all good to go, I just added the /storage directory (which I mounted under Windows as Z:/ using the command “net use z: \\vboxsvr\storage”) to the shared directories in the Air Video Server app.
Here’s a screenshot of what this all looked like on the Windows XP Guest OS:
Now it was time to fire up the iPhone application and test all this juicy new streaming goodness!
I had been messing with this most of the night so the app had already detected the Windows instance of Air Video Server using Bonjour, which is why I had to install it on the Windows XP Guest OS:
Once you tap on the servername, the next screen shows you available shares:
Tapping on the Z:/ drive I made available shows me the directories and files located there, including a count of folders and files next to the folder names:
Drilling down into the TV directory shows me the same thing, folders and the number of files/folders in each directory:
Here I have selected the Bored to Death directory, and you can see that the app grabs screenshots as well as displaying some pertinent file information for each file found, very nice:
After selecting a particular file, I am presented with a few different options. Since this file is an xvid encoded avi, the app won’t be able to play the file natively. Air Video Server will take care of transcoding the file on the fly so that the iPhone app can play it:
Now comes the good stuff, after selecting “Play with Live Conversion”, I am presented with the option to play from the previously played position, the beginning, or seek to a new position, very slick indeed:
After making my choice: “The Beginning”, the app begins the process of buffering the video to the iPhone app:
Now, I suspect that because I’m running Air Video Server inside Windows XP running as a guest OS inside VirtualBox on a Linux host on a older desktop machine, the app complains that it doesn’t have the power to actually play the file, but all is not lost:
I just tell the app to continue anyway, and I was able to play the entire show without interruption:
And boom, about 5-10 seconds later, my TV show begins playing in perfect stutter-free fashion:
Tapping on the screen while the video is streaming brings up controls, in this case a little different than playing an x264 encoded file because the Air Video Server app is transcoding on the fly:
If I wanted to seek to a different position, the app handles that too, which is pretty nice to have, although honestly I usually just watch a show straight through:
All in all this app kicks total ass! I can now stream to any and all of the three iPhones in our house running from a single instance on a Windows XP Guest OS on my Linux box! The app works so well and I couldn’t be more pleased to be able to have this ability, which means I can now watch stuff while lying in bed without using a laptop, which is very nice indeed.