-->

Gone in a Flash: Migrating Videos to a Flash-Less World

Article Featured Image

The keyframe interval you choose will affect the bitrate necessary to get the picture quality you want at varying resolutions. Longer keyframe intervals typically yield better results than shorter keyframe intervals for the same bitrate and resolution. The highest fixed GoP should be at 10 seconds, but the lowest GoP should be between 2 and 3 seconds. Be prepared to use a higher bitrate for shorter GoPs. I also recommend that you use a factor of the frame rate for your GoP duration. For example, if you have 29.97 fps footage, use a keyframe interval of 60, 120, 150, or 300 frames.

GoP duration is directly correlated to the segmentation options you can use for HTTP streaming such as HLS or DASH. Each segment needs to start with a keyframe, and as such, your segment duration will be a multiple of your GoP duration. The shorter the keyframe interval, the shorter (and therefore smaller, byte-size-wise) your segments can be. Segments can include more than one keyframe as well. If you have 24 fps footage with a GoP duration of 6 seconds, then you can use a segment duration of 3 or 6 seconds.

Segment sizes will likely affect how quickly your playback will start and how quickly adaptive streaming metrics will “upsize” the quality for a given connection speed. Adaptive streaming players over HLS or DASH may behave differently from one implementation to the next. Be sure to properly test your adaptive encodes on all targeted platforms with bandwidth throttling applied. You can throttle bandwidth on more advanced networking hardware, but you can use software-based throttling as well, such as Charles or Apple’s Network Link Conditioner control panel, which is available as an optional download from Xcode.

Live Broadcast: Next Steps

Comparatively, it’s easier to prep your content for a Flash-free VOD world than it is to transition to a Flash-free live-streaming world. While CDN vendors have deployment options that can point to HTTP origin manifests and segments, every live streaming deployment I’ve built or optimized for my clients in the last 12 months uses an RTMP push to a CDN or a streaming server such as Wowza Streaming Engine or Adobe Media Server. In this respect, I don’t foresee any major changes in 2017 to the publishing side of live streaming deployment.

With live streaming encoders, you can control the keyframe interval (or GoP) just as you do with VOD encoding. Most hardware encoders have a default GoP duration of 1 or 2 seconds. If you notice an overall degradation of quality in your live stream that is at or near the same duration of your GoP (or “keyframe flash,” as I call it), you need to increase the video bitrate applied to the stream.

If you’re performing live transcodes on a CDN or a streaming server such as Wowza Streaming Engine, your transcoder should use the same keyframe interval as the incoming stream for all bitrate renditions. This type of encoding is called “transrating” instead of “transcoding,” and usually it requires less CPU on the server. As with VOD streams, your segment duration can be a multiple of the frame rate and GoP duration. Your CDN may have predetermined segment durations; make sure you’re using a GoP duration that is compatible.

Real-Time Video Interaction: Is the Flash-less World Ready?

Now this is where the momentum toward a Flash-less world bumps up against reality. As mentioned earlier in this article, the only proposed specifications—not yet ratified as W3C standards—for real-time communication are WebRTC and ORTC. Real-time video may comprise just a segment of the overall online video market, but it includes important businesses like video chat, security feed monitoring, and online auctions, just to name a few.

Like it or not, the Flash plug-in serves to fill a very real gap in consistent technology available across HTML5 browsers. For this reason, I believe the foreseeable online video landscape will include a growing number of hybrid approaches that gradually embrace WebRTC, ORTC, or whatever the final “RTC” spec becomes. Current solutions include the OpenTok Platform from TokBox and the WebRTC Preview Release available for Wowza Streaming Engine 4.4 or higher customers. OpenTok only works on Chrome and Firefox and requires a plug-in installation to work on IE, and it has no support for Safari. Wowza Streaming Engine’s WebRTC capabilities can enable WebRTC-connected clients to send/receive video, audio, and data more efficiently by reducing the outbound data rates in many-to-many use cases. In a one-to-many scenario, Wowza Streaming Engine can take a WebRTC origin live feed and transmux it into more universally adopted formats such as RTMP, HLS, and DASH. While such a scenario means having stricter browser requirements for the publisher, subscribers to the real-time stream can have more flexible browser requirements.

The real financial pain for real-time video business needs is native app development. With a browser and plug-in world, you could keep technical development focused on a web-based platform. Now, the additional costs of iOS and Android application development on top of browser stack development continues to be a drain on budgets for companies everywhere, notably SMB markets.

Players: We’ve Got You Covered

Back in January 2014, I wrote an article discussing the top five “off the shelf,” or OTS, players wherein I touched upon many of the deployment aspects revisited in this article. Most if not all premium OTS players are doing their part in making sure their respective frameworks are getting the most out of native HTML5 playback wherever possible:

  1. JW Player: My top pick among subscription license players continues to remove its dependencies on a Flash fallback. Native MPEG-DASH playback on HTML5 browsers that support MSE, HLS playback via native browser, and Flash fallback, as well as RTMP live or VOD playback, are among the many features this versatile player offers.
  2. Flowplayer: If you’re not a fan of subscription-based player licensing and want a one-time license for your needs, Flowplayer might be your pick. Flowplayer hasn’t expanded its range of playback options to include MPEG-DASH, but it does have a Flash fallback that supports RTMP deployments.
  3. THEOPlayer: This up-and-coming player boasts HLS and DASH playback without any Flash assist and can be used on browsers that don’t natively support HLS. All manifests and segments are loaded with THEOPlayer’s specialized HTML5 JavaScript. This player was built for a Flash-less HTML5 world and has no support for RTMP streams. THEOPlayer is also built for HTML5 browsers that support MSE/EME. If your targets include legacy browsers prior to Internet Explorer 10, Chrome 23, Firefox 47, you may need another player.
  4. Bitmovin: Another Flash-less HTML5 player is Bitmovin’s Adaptive HTML5 Player, which can play HLS and DASH content across more modern HTML5 browsers that support MSE and EME. One of the benefits of Bitmovin’s player is that you can use a fully featured license-free version if your usage is less than 5,000 impressions a month. I’m a big fan of freemium players, and Bitmovin’s pricing model also enables you to test to your heart’s content and deploy for free until you’ve exceeded the limit. Like THEOPlayer, Bitmovin’s player is not designed with a Flash fallback and does not support RTMP streams.

The top two open source or license-free players are MediaElement.js and Video.js. MediaElement.js has not changed much since my coverage of it 3 years ago, and it does support a Flash fallback. But, it hasn’t been updated to support MPEG-DASH or nonnative HLS playback. However, Video.js continues to receive support from the HTML5 video community, with many enhancements or “plug-in” code extras available as open-source add-ons to the core JavaScript library. There are plug-ins, for example, that enable DASH and HLS playback just like the premium players from THEOPlayer and Bitmovin. However, don’t underestimate the potential learning curve for customization of a Video.js player that uses more than one plug-in package.

It’s worth noting that none of the players discussed here support WebRTC (or any RTC) publishing or playback. This in and of itself is no reason for alarm—even when the world was dominated by Flash video players in browsers, low-latency, real-time streams were the domain of custom Flash SWF controllers that handled connections and camera capture.

But Seriously, Can’t I Still Rely on Flash?

As we near the end of this article, you die-hard Flash and RTMP lovers might still be wondering, “Flash isn’t really dead, is it?” The practical answer for most video business needs is yes—the vast majority of short-form, unprotected video playback doesn’t need the luxury of a Flash plugin to play. However, if you’re in the business of live streaming, video chats in desktop browsers, and/or legacy browsers, your dependency on the Flash plug-in won’t be a thing of the past until browser vendors adopt a ubiquitous real-time specification. So, you may be in a dwindling crowd, but you will be in a righteous one that still holds out for more consistent alternatives to emerge. And you may hold out hope (but not your breath) for a truly Flash-free future that will actually support seamless video delivery.

[This article appears in the January/February 2017 issue of Streaming Media Magazine as "Gone in a Flash."]

Streaming Covers
Free
for qualified subscribers
Subscribe Now Current Issue Past Issues
Related Articles

Video: Challenges of Migrating from Flash to HTML5

Disney's Mark Arana and Wowza's Chris Knowlton discuss the challenges content owners face in migrating their video from Flash to HTML5, and the importance of knowing where their video will land before planning their migration strategy.

Another Nail in Flash’s Coffin: CDN Support Rapidly Dwindling

By this time next year, Flash support from the major content delivery networks will have virtually ended. Here's where Flash stands today.

CDNs Phasing Out RTMP Support as Flash Fades Away

Here's a look at all the major content delivery networks' plans for ending support for RTMP and Flash streaming

Moving Beyond Flash: The Yahoo HTML5 Video Player

A behind-the-scenes look at how Yahoo developed its HTML5 video player

Life After Flash: Will Producers Move to HLS, DASH, or Both?

While it's clear that Flash's time is coming to an end, it's less clear what will replace it. A survey shows DASH support, but its real-world use is around one percent.

Companies and Suppliers Mentioned