Encoding for Multiple Devices
Many streaming producers are increasing the number of mobile and over-the-top (OTT) platforms that they support while implementing adaptive streaming to enhance the viewing experience on each. There are two ways to accomplish this: produce a unique set of streams for each target, or derive one smaller group of files that will effectively serve all platforms. In this How-To article, I'll explore the latter approach.
Identify Your Targets
The first step is to identify the platforms that you're targeting. For the vast majority of producers, typically this means both desktop and mobile, with OTT platforms increasingly common. While adding platforms may seem daunting at first, keep these two comforting facts in mind. First, all relevant target platforms play H.264 video, and second, they all use one of three adaptive streaming technologies; Flash Dynamic Streaming (either RTMP or HTTP), Smooth Streaming, or HTTP Live Streaming (HLS). You can see this in Table 1.
The single file max column shows the maximum supported specs for each platform. I didn't include computers because while it varies by platform, there is no hard limitation, and most of the installed base of computers can play at least 720p video. The playback capability on all mobile platforms is device-dependent, and you should see the recommendations for single file streaming at the referenced URL. More on this in a moment. In terms of adaptive streaming, Apple's HLS is the clear winner in the OTT space, with only Microsoft's Xbox 360 not joining the party (no surprise there).
What does this mean for streaming producers? The devil is always in the details to a degree, but if you're distributing single files to each device, you just need to find and use the optimal encoding parameters for each platform. If you're distributing adaptively, you need to support Flash or Smooth Streaming on the desktop, with HLS garnering most of the relevant mobile and OTT targets. Throw in a media server or CDN service that can transmux from one adaptive format to another, and the task starts to look much, much simpler.
Before examining each individual target platform, let's discuss some high-level realities.
Mobile Sets the Tone
First is that encoding for mobile is the most complicated because these devices have the least playback horsepower and the least reliable connection speeds. In contrast, most computers and OTT devices can play any H.264 configuration you throw at it and connect on high-bitrate network or broadband connections, either wired directly or via Wi-Fi.
Though there is some variability in connection speed, when configuring your videos for computers and OTT devices, your primary con-
cerns are delivering acceptable quality at the low end, and bandwidth cost at the high end. When configuring your streams for mobile, it's about configuring streams that play on the least powerful units within your target and are deliverable at low connection speeds. This means that you'll produce some streams for mobile delivery that you may not deliver to either computer or OTT targets. It also means that you should consider your mobile platforms first, so let's jump in.
To add some perspective to our analysis, as of Dec. 20, 2012, NetMarketShare reported that Apple had a 61.1% share of the mobile/tablet operating system market, with Android second at 28.02%, Java ME third at 6.65%, BlackBerry fourth at 1.42%, Symbian fifth at 1.24% and Windows Phone sixth at 0.9%. I'll discuss Apple, Android devices, and Microsoft and ignore the rest.
APPLE MOBILE DEVICES
Video producers obviously prioritize iOS support because it has the largest market share, but also because Apple has done an outstanding job making the iOS platform easy to distribute to. For example, Apple specifically defined the H.264 playback capabilities of every device it released, including resolution, data rate, and profile, a seemingly obvious action that somehow escaped the attention of most Android hardware developers. Second, it tailored and defined HLS to make it simple to reach its devices. A great example can be seen in Table 2, which shows the recommended configuration parameters for 16:9 streams produced for HLS delivery. The data is taken from Apple Technical Note TN2224, titled "Best Practices for Creating and Deploying HTTP Live Streaming Media for the iPhone and iPad."
As you can see, you get specific configuration recommendations and notification of which streams are compatible with which platforms. For video producers seeking to distribute to the iOS platform, TN2224 is the obvious place to start.
ANDROID MOBILE DEVICES
Distributing to Android devices is much more complicated for several reasons. First, there are multiple hardware manufacturers with multiple devices with vague or no references to H.264 playback capabilities. For example, my daughter has an HTC Rhyme; the spec sheet on the HTC website has no mention of H.264 whatsoever.
The number and diversity of devices, along with the lack of H.264 playback information, makes creating a chart such as Table 2 an impossible task. Instead, on the Android Supported Media Formats page, Google details the software-playback capabilities of the Android operating system itself and provides the anemic recommendations shown in Table 3.
One would guess that the hardware playback capabilities of most current Android tablets and smartphones far exceed these recommendations. For example, on my Toshiba Thrive tablet, I've played 720p video encoded using the High profile with no problem (though the Toshiba website similarly failed to provide H.264 playback information). When encoding for Android devices, however, you have to guess. With Apple, you know.
If you're delivering a live video stream, you likely want to publish it on as many platforms as possible. Here's the best hardware and software to pull it off.
The newly released JW Player 6 brings HLS support to the desktop. We talk with Wijering about how he did it and what the future holds for MPEG DASH.