Up until now, if you wanted to play a downloaded video on your iPhone or iPad, you would either have to download an Apple-friendly MP4 version or convert it to one.
Apple’s iPhone 5 specification webpage states that it will natively play ‘H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4 and .mov file formats’.
The problem with this is that for the vast majority of downloadable HD videos, MKV is the container of choice. It has become so popular because of it’s flexibility – it can contain almost any codec for both video and audio tracks – indeed it can have multiple of either track – and has excellent subtitle support too.
Most MKV files will contain an H264 video track which iOS can play, but the MKV container is not recognised and the audio track is invariably not in the preferred stereo AAC format. An MKV video file is simply not recognised by iOS.
The options until a couple of years ago were to either convert the entire video into a recognised file format or ‘remux’ it. There are a myriad of encoding applications available for both the OSX and Windows, but are usually easy to use paid-for applications or perplexing free ones.
Converting the entire file loses quality on both the audio and video tracks and to make matters worse could take a very long time to accomplish on all but the fastest machines.
Remuxing on the other hand is a clever process whereby the application separates the H264 video track from the audio track, and then converts only the audio stream to AAC before stitching them back together again in a friendly MP4 format. Result? No loss of quality for the video, and a playable file.
A few years ago, Apple relaxed the policies on the App Store to allow third party developers to publish their own video players. These have until recently only been able to play unofficial formatted files in software. What this means is that instead of using the dedicated video chip, it uses the CPU to decode it. This can result in a lot of dropped frames, making the video appear jerky and also massively decreases battery life.
Around a year ago, Dolby, angered by lack of money generated through licensing Dolby Digital decoders, requested Apple to stop any developers providing apps on the App Store that could decode Dolby Digital soundtracks without paying Dolby a licencing fee. Apple responded, and all apps that could play Dolby Digital soundtracks were pulled and were only allowed to be republished once either the functionality was removed or the developer paid Dolby a licensing fee.
Google however, seems to have come to the rescue.
It was discovered this week that if you upload an MKV file to Google Drive in what seems like ANY format, including soundtracks in DTS, you can then download (or stream) it using the Google Drive app on iOS immediately. These files are played in the stock video application, meaning that GPU accelerated decoding is being used, keeping battery drain to a minimum. It would seem that Google is quite happy to do the remuxing/converting for you in real time without any cost to you using their servers. Quite why Google is willing to do this is up for debate, but for now, let the good times roll and stop converting!
Written by our guest writer Phil Carroll.