June 16, 2011
Posted by on
My son and I stayed the night at my mother-n-law’s house and he had a tough go of sleeping somewhere other than his bed. He didn’t sleep anywhere near his normal 10-11 winks and woke up pretty grumpy so after playing with him for a hour I let him have some personal time as I needed to get some work done on my laptop. He came over and wanted to play Aa Match Preschool Alphabet on my Macbook Pro before breakfast. Normally I keep my children’s “screen time” as I call it down to ~ 30 minutes/day, but given the circumstances I gave him my iPhone to watch a show on Netflix. I look over at him and he was trying to understand why he couldn’t play the Pixar film Cars. I did my best to explain to him that some movies are not available to watch instantly (the nerve!). I thought for a moment about what to do and remembered that I had ripped another Pixar movie I had purchased recently called Mater’s Tall Tales. The .avi file was on my laptop so now all I needed to do was get the movie copied over to the iPhone.
I have a jailbroken iPhone 4 running iOS 4.3.1. I am not going to get into how to jailbreak an iPhone in this article as it has been covered many times before on many different blogs, nor will I cover what Cydia is and how to install apps from there. I already had the Netatalk and VLC apps, from the Cydia app store, on my iPhone. VLC is a fantastic video player that handles just about every type of audio and video format. I was excited when I heard that VLC was available for the iPhone from the Apple App Store, but it was soon pulled due to licensing issues. You can, however, still get VLC from Cydia (the app store for jailbroken phones). The Netatalk software turns your phone into a file server so you can easily copy files from any Apple OS based machine to your iPhone*. When you run Netatalk your phone will show up in the OS X Finder application like so:
* One step that MUST be taken after you jailbreak is to change the password (the Mobile Terminal app does not work out of the box, use the Mac or Windows instructions) for the root and mobile user on your phone to prevent unauthorized access.
So I copied the .avi file from my laptop to the /var/mobile/Media directory on my iPhone. Started VLC and started playing the movie. My son was initially happy and sat down next to me to enjoy the show. After a couple of minutes he turned to me and said “Dad, I can’t hear the words.”. Houston we have a problem.
It turns out that the Dolby Digital 5.1 ac3 stream contained in the .avi was not getting downmixed to 2 channel stereo sound. Without the center channel most of the words could not be heard. I looked for some options for audio for VLC, but I could not find anything useful. So I did some Googling and found another solution. AVPlayer claims to do everything VLC does and more which includes TV out, orientation lock, and downmixing of ac3 streams into stereo. I downloaded the application from the Apple App store and since I already had the .avi file on my iPhone I used iFile to move the file into /var/mobile/Applications/[AVPLayer GUID]/Documents *.
*AVPlayer however has an HTTP and FTP interface for copying files directly to your iPhone and is the recommended method of file transfer. If I had started out using AVPlayer I would have selected this method.
I started up AVPlayer and tada! Playback was smooth and the audio was downmixed correctly. My son was happy and I could finish up my work before breakfast so we could go on the bike ride that I promised him.