Upcoming Industry Conferences
Streaming Media West [19-20 November 2019]
Live Streaming Summit [19 November 2019]
Past Conferences
Streaming Media East 2019 [7-8 May 2019]
Live Streaming Summit [7-8 May 2019]
Content Delivery Summit [6 May 2019]
Streaming Forum [26 February 2019]

Hulu’s Move to DASH
The U.S. OTT service's Baptiste Coudurier talks about the hard work—and black magic—behind the smooth migration to MPEG-DASH, which now accounts for 75% of its traffic

Thus Hulu laid out the groundwork for a swift migration from Smooth to DASH across all the devices: The first phase is to upgrade the video file format to be compatible with both Smooth and DASH players, and the second phase is to migrate the players progressively toward DASH manifests instead of Smooth manifests. This is exactly what Hulu did for the Chromecast, using the On-Demand DASH profile and SegmentBase fragmentation. But how exactly can you be compatible with both worlds? Fasten your seatbelt and grab some aspirin.

The Atoms Alchemy

Coudurier then reveals the black magic: “You need to start from a simple CENC [Common Encryption Scheme], AES [Advanced Encryption Standard] 128 CTR [counter mode] basis, where you inject your PSSH [Protection System-Specific Header] atoms (Widevine and PlayReady in our case). Then the trick is only in the packaging of the initialization vector. That’s written in the PIFF 1.3 spec: If you want to be CENC compatible, SID information can be stored anywhere you want (that’s the ISO approach). The atom references only the offset and the size. So you can put it everywhere, and some people do put it in the MDAT atom, but in fact you need to put it into the Smooth Streaming 1.1 atom with a proprietary UUID, and then you reference the size and the offset of this atom.”

How does a regular Silverlight player handle this format? “When the Silverlight 4 player finds the atom he gets the SID info he needs, then he discovers the CENC layer but he skips it and is able to decrypt the contents as he has all the necessary information,” Coudurier says. “On the other side, DASH players don’t have any difficulty either to track down the SID in the Smooth Streaming box. That’s where you can feel the power of being both PIFF 1.1 and 1.3 compatible: The 1.1 version is the Smooth Streaming one, and the 1.3 version has been used as the basis for ISO-BMFF, which DASH relies on. The main difference is that ISO mandates the use of officially tagged box versus proprietary ones. CENC modifies some aspects a bit more, and DASH adds up the TFDT (Track Fragment Decode Time) atom and the SIDX (Segment Index Box) one for indexing, but that’s roughly the same thing.”

Here he remembers some additional magic he had forgotten: “the MFRA (Movie Fragment Random Access) atom that you need to use, so that Smooth finds the offsets. Actually, there’s a bit more to implement in order to wrap it up, but that’s not rocket science.” Still keeping up? His conclusion sounds like a relief: “Once you’ve packaged your DASH video files, you just have to regenerate your Smooth server manifests, and you’re done.”

How to combine Common Encryption and Smooth Streaming encryption

The Science of DASH Players

Once you get your video file format and DASH manifests in place, you’ll need to catch up with the player side of things. When Hulu started to widen its DASH support in mid-2013, there was very little support in the SDKs. Some devices, such as Chromecast and Amazon Fire TV, support SegmentBase DASH natively, but most devices offer only partial support.

“Even if you always work closely with the manufacturers so that they provide the media related features, you sometimes have to use a third-party SDK, and you almost always have to complete the platform software basis (like the Sony Trilithium framework) with your own code to provide the missing mechanisms, like manifest parsing, alongside your own business logic,” Coudurier says. “Shipping your own DASH framework in the app has some advantages, as it reduces your dependency towards the manufacturers, but it increases your development effort.”

Regarding the DASH format itself, he recognizes that Hulu has sometimes had to hack a path, but Coudurier says it’s been a reasonable one. “With SegmentBase fragmentation, most of the intelligence is embedded in the initialization section of the monoblock MP4 file, just before the first segment, or even in an external file,” he says. “This means that you end up with very light manifests and a much optimized playback session management, as the ranges are loaded once by the player and kept in memory. Others also use this DASH mode, and it’s very efficient for on-demand contents.”

The result of these engineering efforts is that Hulu is now streaming canonical MPEG-DASH on PlayStation 3 and 4, Roku, Android 4.2+, Chromecast, and Amazon FireTV, among other undisclosed platforms. And the lineup is growing each day.

“The next big frontier is the iOS platform,” Coudurier says. “So far we have been producing a separate HLS output.” The day when it will change might not be so far in the future, as several reports confirm that Netflix combines CENC and Fairplay in the DASH segments loaded by its most recent iOS apps. One global standard format for IP media delivery—this is the original promise of DASH, and now it’s within reach.

A Strategy for the Desktop

Interestingly, even if it were able to develop JavaScript-based DASH players, Hulu didn’t rush to migrate its desktop Flash-based player to an HTML5 version, just as it skipped the migration to Silverlight previously. This is perhaps the root cause for Flash longevity in Hulu’s player range: They still have a good support in Chrome, as the Flash engine is embedded in the browser and supports Access DRM.

“The only platform where we have a problem is Chrome on Linux, as Google claims Adobe doesn’t ship the Access DRM component for Linux,” Coudurier says, though he says that the fact that it works on Chromebooks indicates that Google is bluffing (go2sm.com/linux flash). “As we want to provide a proper Linux support, this problem is the final trigger for us dropping Flash video on desktop and migrate to DASH in all browsers. The potential of MSE [Media Source Extensions] combined with EME [Encrypted Media Extensions] is clearly interesting but it’s not yet widely supported across all browsers on all platforms. Today it’s only Chrome and Chrome Mobile, Safari on OS X Yosemite, Explorer 11 on Windows 8.1, and soon Firefox with Access CDM. For all the other browser/OS options, we need an alternative but solid DASH player with DRM support.”


Hulu’s current desktop player using the Flash technology

Discussing the desktop player strategy further, he exposes a rather original approach in an era in which actors go straight to a JavaScript-based player for CENC/multiple-DRM DASH with a failover in DRMized HDS.

“This is where the Flash Player environment is still the best bet, as it’s fitting our number one (non-negotiable) criteria: multibrowser coverage,” Coudurier says. “We are evaluating several options for Access-DRMized DASH playback, including the Adobe Primetime option and the native Flash Player one. Once we will have properly covered this first use case, we will decide when this initial implementation transforms itself into a fallback one, with the HTML5/MSE/EME player being the primary DASH player choice for 70% of browsers, at some point. We always will have 30% or so of legacy coverage to ensure, so we keep this hard fact on top of our strategic considerations.”

Given the recent history of MSE stack regressions in Chrome browser, this might be an even safer approach in the short term.

Implementation Efforts

Before implementing DASH, Hulu was not exactly a beginner when it came to in-house workflow developments. It had migrated the transcoding chain to an FFmpeg/x264-based workflow and developed or integrated a number of packagers, both for handling HLS specifics (frame-accurate cuts for ad breaks, metadata tweaks, and FairPlay DRM) as well as producing Flash video/Access DRM, Smooth/PlayReady DRM, and Widevine Classic format. The additional effort generated on the backend side by the DASH migration was reasonable, Coudurier says.

“The main part of the work was the research on the shared format and the implementation of the new packaging solution for ISO-BMFF with CENC and multiple DRMs (backwards-compatible with Smooth Streaming),” he says. “Because of my background and experience, a small team and I were able to complete this in a few months.” On the player side of things, Coudurier says it was even easier. “The Chromecast implementation was relatively straightforward,” he says.

“Using DASH forced us to move in the JavaScript direction, whereas we were more ActionScript and C# oriented on the player side. It wasn’t a problem at all, the learning curve was quite short, and we took the occasion to move towards a more modern language.”

How painful was it to move to multiple DRMs over Common Encryption? Not very—Coudurier makes even this sound easy.

“With EME we are entering a fragmented world where the browser dictates which DRM you need to use,” he says. “It’s somehow more complex than previously when the DRM was handled by a browser plugin, but in terms of content preparation it’s really painless, as CENC is doing 99% of the job and you just have to take care of applying the various DRMs signaling in the PSSH boxes. It’s really easy, as everything is standardized here—you don’t have a specific workflow per DRM as we knew before with the traditional ABR silos. So far, Widevine is the easiest to manage for us, as Google takes care of the DRM license delivery duties, but hosting our own Access and PlayReady servers has never been a major challenge; you can cope with very high loads with relatively few servers.”

Related Articles
The next version of HbbTV is bringing a much more powerful toolset with it, and has the potential to change the current worldwide television landscape.
Standardization fosters innovation, and MPEG-DASH is making huge strides. Learn the rapid steps DASH took in the past 12 months, and why nothing can stop its future.