Update: JW7 is now available. Check it out here.
When Amazon introduced RTMP streaming for CloudFront, it was big news for the Flash platform in general, and here at LongTail it has been no exception. Overnight, RTMP became a hot topic on our forums, where before we had only heard from veterans in the Flash video space. It’s not hard to understand why, since RTMP has been expensive and difficult to configure for most folks. In addition to RTMP streaming in general, we’re fielding a lot of questions on CloudFront’s support of RTMP. What does it support? How do I set it up? Is it right for my site? This post will attempt to answer these questions, as well as provide some background on video streaming on the Flash platform.
Streaming Video With Flash
For most people, RTMP is just another serving of web-jargon alphabet soup. Let’s clarify it a bit. RTMP (Real Time Messaging Protocol) is a web transmission standard which allows a backend server to transfer video, audio and data to the Flash Player. It’s particularly useful for video streaming, since the Flash Player can communicate back to the server about how much video it has consumed, and how much more video the server needs to send. This is a distinct advantage over so-called progressive download video, where a web server simply begins sending bytes out to the video player over standard HTTP until there are no more bytes to send.
When Amazon CloudFront was first introduced, it only supported progressive downloads as a mechanism for serving video content. While this was very simple to set up (no different from serving other static files, such as images and text, from a CDN), it came with all of the usual disadvantages of progressive download video delivery:
- Wasted bandwidth – While most viewers will only watch a small portion of the video, many will download the entirety of the video. This means higher bandwidth costs for the publisher, and less available bandwidth for other viewers.
- Limited seeking – With progressive downloads, the viewer can only seek to areas of the video that have already been downloaded.
- No long videos – For long-form or high-bandwidth videos, progressive downloading is not recommended as it can slow down (oer even crash) a viewer’s browser.
Now, with CloudFront’s support for RTMP, you can stream your video content. RTMP Streaming addresses the above issues, as well as providing some additional benefits. In addition to saving bandwidth and allowing better seeking control, RTMP can do some neat tricks:
- Harder to steal – RTMP traffic is more difficult (although not impossible) to hijack than video transmitted over HTTP. Additionally, RTMP servers have several mechanisms to encrypt and sign streamed content.
- Dynamic Bitrate Switching – Newer RTMP servers have the ability to switch seamlessly between two videos, provided the Flash player connected to the stream is using Flash version 10.0 and up. This means that if the viewer’s bandwidth drops below the bitrate of the stream, the player can switch to a lower resolution without interrupting the viewer’s watching experience.
- Live Streams – RTMP has the ability to stream live content as it comes in.
RTMP in the CDN Market
Several CDNs, such as Akamai, EdgeCast, Limelight and Highwinds support RTMP streaming. CloudFront started offering pretty much the same functionality. So why should you care?
The first answer is in CloudFront’s pricing model. For small publishers (the vast majority) it offers RTMP streaming at a fraction of the cost of other CDNs. Also, while most CDNs don’t publish their price structures (the only way to find out how much they cost is to contact each one directly and get a quote), Amazon’s pricing is posted clearly and is quite competitive. Their a-la-carte pricing starts at $0.15 per GB if you stream under 10 TB per month (for US and EU edge nodes; the price goes up for Asian traffic).
Another benefit to using CloudFront Streaming is that it’s very easy to set up with the JW Player. All you need to begin streaming from CloudFront is an Amazon Web Services account, a credit card, and some video content to upload.
We’ve heard some people tell us they’re concerned about the ability to scale with AWS, since their published pricing does begin to lag behind the other CDNs at the high end. This could be the case, but there are many examples of enterprise companies (such as Sorenson Media) who use CloudFront.
One feature of RTMP which most CDNs support, but that CloudFront does not, is live streaming. As of today, Amazon’s website says that they intend to support live streams on CloudFront in the future. For some people this is obviously a deal-breaker, but if you’re not casting live streams, this won’t effect you in the slightest.
CloudFront’s support of RTMP is a big step forward in the online video industry. It allows publishers to implement an advanced streaming technology using a self-served, pay-as-you-go pricing model. This low threshold is why Bits on the Run, LongTail’s online video platform, has a new beta feature adding support for CloudFront. When you sign up for Bits on the Run, you have the option of linking your Bits account to your CloudFront account, and Bits takes care of the rest. This makes setting up RTMP streaming extremely easy, including such features like dynamic streaming, log aggregation, private content and DNS masking.
Is CloudFront a game-changer in the CDN industry, as many have predicted? I’m not sure I’d go that far, but given Amazon’s self-service design, relative ease of use, aggressive pricing structure and integration with their other web service offerings (S3 and EC2, to name a few), CloudFront is a compelling option, especially for the thousands of smaller video publishers.
Interested? Then check out this tutorial to start streaming.